光放在debug目录是没用的,应该放在cs文件目录,然后加入工程,并且鼠标右键点击References目录,把这些dll添加到引用目录中,才会去掉感叹号,
解决方案 »
- API读写设备在 多线程中句柄无效!亟待高手指点!
- 怎么样自己绑定手机,实现google的短信提醒
- 数组查找特定字符所在下标
- ADO.NET对数据集的处理有没有类似ADO的方法?
- 参数中的对象没有名字,这是什么用法?(偶实在是查不到了,很弱质的问题哈!)
- C# 引用orcale的触发器 怎么用
- 在向一个数组中添加10项,要删除第二项这么实现???????
- 我的删除方法有什么问题啊
- 有谁知道吗?虚心请教,谢谢!!
- 淘宝中点击忘记密码出现的网页中如何实现?
- 一个莫名其妙的问题,求指教(很短的代码,就四行)
- C# 创建TXT文本文件 编码格式的问题,还有如果存在一个TXT文件,可以更改它的编码格式吗?
Microsoft visual studio
A project with an output type of class library cannot be started directly.
In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project.
C:\ATTENUATIONC\schemeselection .cs(194,30): warning CS0168: The variable 'ex' is declared but never usedCompile complete -- 0 errors, 1 warnings
Build started 2012-5-10 20:54:57.
CoreResGen:
c:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ResGen.exe /useSourcePath /r:C:\ATTENUATIONC\bin\Debug\Excel.dll /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /r:C:\ATTENUATIONC\bin\Debug\noiseBaseDataTable.dll /r:C:\ATTENUATIONC\bin\Debug\noiseGraph.dll /r:C:\ATTENUATIONC\bin\Debug\noiseGraphDLL.dll /r:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /r:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /r:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /r:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /r:C:\ATTENUATIONC\VBIDE.dll /r:C:\ATTENUATIONC\bin\Debug\Word.dll /r:C:\ATTENUATIONC\bin\Debug\WordAuto.dll /r:C:\ATTENUATIONC\WriteToWord2003.dll /r:C:\ATTENUATIONC\WriteToWord2007.dll /compile DengZhiMian.resx,obj\Debug\AttenuationCalculation.DengZhiMian.resources FormCurveForNoiseBarrier.resx,obj\Debug\AttenuationCalculation.FormCurveForNoiseBarrier.resources FormNoiseCurveOnLine.resx,obj\Debug\AttenuationCalculation.FormNoiseCurveOnLine.resources GridSetPlanarSurface.resx,obj\Debug\AttenuationCalculation.GridSetPlanarSurface.resources ManageCorrectValue.resx,obj\Debug\AttenuationCalculation.ManageCorrectValue.resources ManageTransformerNoise.resx,obj\Debug\AttenuationCalculation.ManageTransformerNoise.resources NoiseCalculation.resx,obj\Debug\AttenuationCalculation.NoiseCalculation.resources Properties\Resources.resx,obj\Debug\AttenuationCalculation.Properties.Resources.resources "schemeselection .resx",obj\Debug\AttenuationCalculation.schemeselection.resources singleSourceMeshing.resx,obj\Debug\AttenuationCalculation.singleSourceMeshing.resources ManageBarrier.resx,obj\Debug\AttenuationCalculation.ManageBarrier.resources
CoreCompile:
c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:C:\ATTENUATIONC\bin\Debug\Excel.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:C:\ATTENUATIONC\bin\Debug\noiseBaseDataTable.dll /reference:C:\ATTENUATIONC\bin\Debug\noiseGraph.dll /reference:C:\ATTENUATIONC\bin\Debug\noiseGraphDLL.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Data.DataSetExtensions.dll" /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Xml.Linq.dll" /reference:C:\ATTENUATIONC\VBIDE.dll /reference:C:\ATTENUATIONC\bin\Debug\Word.dll /reference:C:\ATTENUATIONC\bin\Debug\WordAuto.dll /reference:C:\ATTENUATIONC\WriteToWord2003.dll /reference:C:\ATTENUATIONC\WriteToWord2007.dll /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\ATTENUATIONC.dll /resource:obj\Debug\AttenuationCalculation.DengZhiMian.resources /resource:obj\Debug\AttenuationCalculation.FormCurveForNoiseBarrier.resources /resource:obj\Debug\AttenuationCalculation.FormNoiseCurveOnLine.resources /resource:obj\Debug\AttenuationCalculation.GridSetPlanarSurface.resources /resource:obj\Debug\AttenuationCalculation.ManageCorrectValue.resources /resource:obj\Debug\AttenuationCalculation.ManageTransformerNoise.resources /resource:obj\Debug\AttenuationCalculation.NoiseCalculation.resources /resource:obj\Debug\AttenuationCalculation.Properties.Resources.resources /resource:obj\Debug\AttenuationCalculation.schemeselection.resources /resource:obj\Debug\AttenuationCalculation.singleSourceMeshing.resources /resource:obj\Debug\AttenuationCalculation.ManageBarrier.resources /target:library AttenuationC.cs DengZhiMian.cs DengZhiMian.Designer.cs ForecastReport.cs FormCurveForNoiseBarrier.cs FormCurveForNoiseBarrier.designer.cs FormNoiseCurveOnLine.cs FormNoiseCurveOnLine.Designer.cs GridData.cs GridSetPlanarSurface.cs GridSetPlanarSurface.Designer.cs ManageCorrectValue.cs ManageCorrectValue.designer.cs ManageTransformerNoise.cs ManageTransformerNoise.designer.cs NoiseCalculation.cs NoiseCalculation.Designer.cs optimize.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs PublicFunction.cs "schemeselection .cs" "schemeselection .Designer.cs" singleSourceMeshing.cs singleSourceMeshing.Designer.cs writeDatatoForecastReport.cs writeDatatoSurface.cs ManageBarrier.cs ManageBarrier.designer.cs
_CopyFilesMarkedCopyLocal:
Copying file from "C:\ATTENUATIONC\VBIDE.dll" to "bin\Debug\VBIDE.dll".
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\ATTENUATIONC.dll" to "bin\Debug\ATTENUATIONC.dll".
ATTENUATIONC -> C:\ATTENUATIONC\bin\Debug\ATTENUATIONC.dll
Copying file from "obj\Debug\ATTENUATIONC.pdb" to "bin\Debug\ATTENUATIONC.pdb".Build succeeded.Time Elapsed 00:00:05.81
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========此外还有一个弹出的错误提示框
标题:Microsoft Visual Studio
内容:A project with an Output Type of Class Library cannot be started directly .
In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project.
可是 从上面明明看出编译是成功的, 为什么run时 出现这样的问题? 怎么修改呢?
如果你一定要用直接运行这个类库,只能用 "调试--启用新实例"。