开发者

Reference .NET 2.0 dll from .NET 4 client profile

开发者 https://www.devze.com 2023-01-17 09:24 出处:网络
I am wanting to move some winforms projects to the .NET 4.0 client profile. Unfortunately they reference an old project which has lots of crystal reports in it. Crystal Reports requiring System.Web am

I am wanting to move some winforms projects to the .NET 4.0 client profile. Unfortunately they reference an old project which has lots of crystal reports in it. Crystal Reports requiring System.Web among other assemblies not in the client profile.

As I understand it running the main exe as .NET 4 client profile would try to run any referenced dll's in the same framework version so it won't compile because of the lack of System.Web for the referenced assembly. Is there a way to work across framework versions so 开发者_如何学JAVAthe main exe's will run in .NET 4 Client Profile but when working with the crystal reports project it uses an older version.

I have googled but am having trouble coming up with the correct terminology to find an answer.

I realize I could use the .NET 4.0 full version but am trying to avoid the deployment hassle.


Just go for the full profile install. It's only about 10MB different, so it's no great shakes after you're installed it. If you use the web installer then it only downloads what you need to update the current machine.

I have done a similar workaround to yours with a 3.5 dll that used the full 3.5 framework due to a supplier dependency. It works fine, but you need the full 3.5 framework installed on the machine too and the 4.0 installer does not install earlier versions.

Personally, I'm moving the whole thing to 4.0 Full now as I find it's far more hassle to try and workaround it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号