views:

80

answers:

1

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?

+2  A: 

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.

Ion Todirel
yeah fair enough. i can edit and continue in a console app as you said. Maybe it is because my project uses controls that target 3.5..the search goes on. thanks..
Aran Mulholland
That should be supported as well. Try to come up with few simple repro steps that can help me reproduce what are you seeing.
Ion Todirel