Visual Studio 2010,针对调试 4.0 框架和发布 4.0 客户端配置文件
我无法编辑并继续以 4.0 客户端配置文件为目标的项目,但如果我以完整的 4.0 框架为目标,则可以。
我想针对客户端配置文件进行发布,以限制安装所需的下载。
无论如何,我可以根据客户端配置文件进行构建,但对完整版本进行调试吗?
I have been unable to edit and continue in a project that targets the 4.0 Client Profile however i can if i am targetting the full 4.0 Framework.
I want to release against the client profile to limit the download required to install.
Is there anyway i can build against the client profile but debug agains the full version?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个坏主意。当您定位客户资料时,我们应该首先弄清楚为什么您无法编辑并继续。那应该完全有效。根据当前配置针对不同的框架是一件非常糟糕的事情!哦,是的,即使这是一个好主意,它也做不到。为什么?因为项目层次结构和一些内部对象必须更新,但如果不重新加载项目,则无法完成此操作。另一方面,您可以从配置管理器更改当前配置,而无需重新加载。所以2个不会粘在一起。即使您将 TargetFrameworkVersion 和 TargetFrameworkProfile 元素移动到受配置条件约束的 PropertyGroup,它也不会按您想要的方式工作。 Visual Studio 也在设计时使用它。所以,不,不,不。
它究竟如何“不起作用”,您收到错误吗?
在 Visual Studio 2010 控制台应用程序(以及其他应用程序)中,默认情况下以客户端配置文件为目标。为什么不创建一个面向 4.0 的控制台应用程序,看看是否可以在那里编辑并继续。如果可以,那么您当前的项目有问题。
编辑:从命令行,您当然可以随时将配置文件指定为 MSBUILD。
That is a bad idea. We should figure out first why you can't edit and continue when you target the client profile. That should totally work. Targeting different frameworks based on the current configuration is a VERY BAD thing to do! Oh, yes, even if it would be a good idea it can't be done. Why? Because the project hierarchy and some internal objects will have to be updated, but that can't be done if the project is not reloaded. On the other hand you can change the current configuration from Configuration Manager without a reload. So the 2 doesn't stick together. And it wouldn't work as you want, even if you'd move the TargetFrameworkVersion and TargetFrameworkProfile elements to you your PropertyGroup constrained with the configuration condition. Visual Studio also is using it during design-time. So, no, no, no.
How exactly it "doesn't work", do you get an error?
In Visual Studio 2010 Console Applications (among others) target the client profile by default. Why don't you create a Console Application targeting 4.0 and see if you can edit and continue there. If you can then there is something wrong with you current project.
EDIT: From the command line, you can of course specify the profile to MSBUILD at any time.