【发布时间】:2013-02-08 06:30:26
【问题描述】:
在链接 Visual C# .NET Framework 4.0 支持的项目时出现此错误,因为我添加了 C++ CLR DLL 与 4.5 .NET Framework 的引用。
error CS0246: The type or namespace name 'project' could not be found (are you missing a using directive or an assembly reference?)
因此,对于这个 C++ CLR 支持的 DLL 项目,我如何在 Visual Studio 2012 中将 .NET framework 4.5 降级到 4.0?
我之前看到过这就是原因。对于我的 C++,此链接可能有助于我的事业 http://msdn.microsoft.com/en-us/library/bb772098(v=vs.90).aspx
我刚刚也发现了这个警告:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3274: The primary reference "X" could not be resolved because it was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
有人见过这个吗?那么我如何降级 C++ DLL?
谢谢
【问题讨论】:
-
老兄——你在说什么? 1)您应该能够将您的项目配置为几乎任何您想要的.Net版本,并且2)根据您提供的有限信息,我什至不相信您的构建错误一定与.Net版本相关。建议:在您的原始项目中找出“项目”的来源。发回详细信息。
-
我已经更新了问题,但我开发了这个其他 C++ DLL
标签: c++ .net visual-studio frameworks