I have been unable to edit and continue in a project that targets the 4.0开发者_Go百科 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?
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.
精彩评论