发布模式时出错 [英] error while for Release mode

查看:74
本文介绍了发布模式时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用发布模式运行项目时,我收到以下错误:



找不到类型或命名空间名称'计算'(你错过了吗?使用指令或程序集引用?)





如果我在调试模式下运行,它就可以了。

when i run project using Release mode, I get following error:

"The type or namespace name 'Calculation' could not be found (are you missing a using directive or an assembly reference?)"


If I run in Debug mode, it goes fine.

推荐答案

还请将库模式版本设置为名称空间'计算'。



并在构建部分中给出发布的公共路径对于输出路径中的所有库:
Please also set your library mode release where namespace 'Calculation'.

and give the common path for release in build section for all libraries in Output path:


将缺少的dll移动到项目的release文件夹。

转到项目属性并在Build选项卡上确认,您的输出目录是bin \ release。\\。
Move the missing dlls to the release folder of your project.
Go to your project properties and confirm on the Build tab, that your output directory is bin\release\.


我们无法为您排序 - 我们无法访问您的计算机以查看计算类(或命名空间)或声明它的地方。它不是标准的.NET类,所以取决于你。



首先在项目中找到所有对Calculation的引用(VS有一个在文件中查找工具这应该有帮助)并检查是否有一些 #if 代码,在某些情况下将其排除在外。



如果它是您自己的类或您的某个程序集中,那么您需要检查您用于Release版本的版本是否是正确的构建级别 - 尝试清理并重建所有并查看是否解决了它。 br />


很抱歉在这里是通用的,但我们只是无权查看更多内容。
We can't really sort that out for you - we don;t have access to your computer to see what the Calculation class (or namespace) is or where it is declared. It's not a standard .NET class, so it's up to you.

Start by finding all references to Calculation in your project (VS has a "Find in Files" tool which should help) and check if there is some #if code round it which excludes it under some circumstances.

If it is your own class, or in one of your assemblies, then you need to check that the version you are using for the Release build is the correct build level - try a clean and rebuild all and see if that solves it.

Sorry to be generic here, but we just don't have access to see anything more.


这篇关于发布模式时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆