为什么不是防爆pression混合4的设计师的工作,每当我们使用生成配置? [英] Why isn't Expression Blend 4's designer working whenever we use build configurations?

查看:171
本文介绍了为什么不是防爆pression混合4的设计师的工作,每当我们使用生成配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与前pression混合4.我一直在使用混合4并结合Visual Studio 2010中有一段时间了一个奇怪的问题,没有发生任何事故(超出超频繁死机)。现在,我们的图形设计人员要开始使用混合做一些润色工作。

I'm having an odd issue with Expression Blend 4. I've been using Blend 4 in conjunction with Visual Studio 2010 for quite a while without incident (beyond the ultra-frequent crashes). Now our graphics designer wants to start using Blend to do some touch-up work.

我们能够获得混合编写他的计算机上的解决方案。不幸的是,当我们试图打开任何XAML文件,我们从那里通过包括合并资源字典资源和附加属性都无法识别设计错误。基本上,这是因为虽然构建工件都没有见过,即使是混合编制,没有错误的解决方案。

We were able to get Blend to compile the solution on his computer. Unfortunately, when we try to open any XAML file, we get errors from the designer where resources included through the merged resource dictionary and attached properties are not recognized. Basically, it's as though the build artifacts aren't seen even though Blend is compiling the solution with no errors.

在我们设置的唯一古怪的是,我们的解决方案包含多个构建配置,你可以在不改变混合构建配置。

The only oddity in our setup is that our solution contains multiple build configurations, and you cannot change your build configuration in Blend.

为什么你想混合的设计者未能加载它内置了文件?

Why do you suppose Blend's designer is failing to load the files that it built?

推荐答案

在搞清楚如何混合4生成Visual Studio项目/解决方案,我发现为什么我们的图形设计师的混合拷贝而不能正常工作,并解决了问题。我们已经建立了多个构建配置应承担责任。下面是我发现了什么细节,并警告其他人使用多个版本的配置列表,混合4和Visual Studio 2010。

In figuring out how Blend 4 builds Visual Studio projects/solutions, I found out why our graphics designer's copy of Blend was not working properly and fixed the problem. The multiple build configurations that we had set up were to blame. Here's the specifics of what I found out and a list of warnings to anyone else using multiple build configurations, Blend 4, and Visual Studio 2010.

警告1:混合不允许您选择一个构建配置

在Visual Studio中,当你建立,你总是与特定的构建配置建设。这个设置是可以改变的。混合似乎并不需要更改构建配置在它的UI设置任何地方的能力。相反,它使用自己的启发式用于选择构建配置使用。

In Visual Studio, when you build, you are always building with a specific build configuration. This setting can be changed. Blend doesn't appear to have the ability to change the build configuration setting anywhere in its UI. Instead, it uses its own heuristics for selecting which build configuration to use.

警告2:混合没有使用相同的逻辑来选择的大楼将它设计时做了构建配置

这是什么造成的问题我们。如此看来,混合有两种不同的方式来选择一个构建配置。当你编译,它使用在.csproj的文件的逻辑选择默认生成配置(见警告3)。设计师,但是,看起来解决方案文件为其建立它应该用于解决程序集引用(见报警4)配置的输出目录。因此,尽管共混物编译好了,设计师没有看编译后的文件,但在一个空的bin目录下创建它。

This is what was causing issues for us. It seems that Blend has two different ways to choose a build configuration. When you compile, it uses the logic in the .csproj files for selecting a default build configuration (see warning 3). The designer, however, looks to the solution file for which build configuration's output directory it should use to resolve assembly references (see warning 4). So although Blend was compiling alright, the designer was not looking at the compiled files but at an empty bin directory it created.

警告3:Blend和Visual Studio的不处理默认生成配置相同的方式

目前的.csproj的文件的顶部,有一个指定其生成配置运行CSC.EXE时要使用不指定当一个属性组。 Visual Studio中似乎并没有修改该数据,可能是因为它不需要它因为它总是使用一个定义的生成配置。我们已经删除默认的调试和Release配置,并提出我们自己的DebugWindows,ReleaseWindows,DebugMac和ReleaseMac配置,但该项目文件仍然表示,使用调试未指定配置时。混合4运行CSC.EXE没有生成配置,因此使用默认逻辑。因此,我不得不手动修复了.csproj的文件。

At the top of .csproj files, there's a property group that specifies which build configuration to use when one is not specified when running csc.exe. Visual Studio does not seem to modify this data, probably because it doesn't need it given that it always uses a defined build configuration. We had removed the default Debug and Release configurations and made our own DebugWindows, ReleaseWindows, DebugMac, and ReleaseMac configurations, but the project files still said to use "Debug" when no configuration is specified. Blend 4 runs csc.exe with no build configuration, so the defaulting logic is used. Therefore, I had to manually fix up the .csproj files.

警告4:Visual Studio中不允许你为了你的解决方案的构建配置,以及排序是相关的混合

相反,如何选择混合打造编译时配置的,混合的设计师似乎使用第一的解决方案配置的溶液中的文件项目,构建配置相关联。设计师然后查找到输出目录的的为它的组件配置。换句话说,如果有该.csproj的构建配置默认值和第一解决方案配置的设置不匹配,设计师不会看到你的类,合并资源字典等,即使你建这个项目。

Contrary to how Blend selects build configurations when compiling, Blend's designer seems to use the first solution configuration in a solution file to associate projects with a build configuration. The designer then looks to the output directory for that configuration for its assemblies. In other words, if there's a mismatch between the .csproj build configuration defaults and the first-solution-configuration's settings, the designer will not see your classes, merged resource dictionaries, etc, even if you built the project.

哪种溶液配置第一无法通过Visual Studio改变。对于我们修复设计师寻找构建工件在这里,我们不得不手动重新排序.sln文件的解决方案配置。

Whichever solution configuration is first cannot be changed through Visual Studio. For us to fix where the designer looked for build artifacts, we had to reorder the solution configurations manually in the .sln file.

这篇关于为什么不是防爆pression混合4的设计师的工作,每当我们使用生成配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆