2017-06-11 65 views
2

私は複数のプロジェクトを持つソリューションを持っています。私は正しい順序と依存関係を構築しています。このプロジェクトは、Visual Studio 2017(26430.13)とまったく同じバージョンの別のマシン上に構築することができます。唯一の違いは、現在Windows 10でビルドしようとしていることです。ビルドできる他のシステムはWin 8.1です。しかし、Win 10を搭載した3台目のマシンでもビルドが行われます。VS 2017 c#エラーCS0234名前空間に型または名前空間の名前が存在しません(アセンブリ参照がありませんか)

私の問題は、解決策を構築することはできませんシステム上で以下の通りです:

(名前空間:pcbox)ucx.v2と呼ばれるプロジェクトがあります。このプロジェクトをビルドすると、エラーはなく、正しくビルドされます。

Timerと呼ばれる別のプロジェクトがあります。このプロジェクトでは、参照のucx.v2への参照があります。それは壊れていない。このプロジェクトをビルドすると、参照エラーについて100以上のエラーが発生します。

Timerプロジェクトをビルドすると、最初にucx.v2プロジェクトのビルドが開始され、エラーなく終了するので、ビルド順は正しいです。

私は以下を試しました: - VSを再起動してください。 - ソリューションをクリーンにして、プロジェクトを再構築 - タイマプロジェクトから参照を削除し、 を運がなくてもう一度追加します。

注:私は作業マシンからソリューションをコピーしました。私はあなたの問題は、ここでこのラインが原因であると考えてい

1>------ Build started: Project: ucx.v2, Configuration: Debug Any CPU ------ 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\UcDataAdapter.cs(463,21,463,28): warning CS0108: 'UcDataAdapter.Dispose()' hides inherited member 'Component.Dispose()'. Use the new keyword if hiding was intended. 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\ras\RasConnectionNotify.cs(35,69,35,93): warning CS0618: 'WaitHandle.Handle' is obsolete: 'Use the SafeWaitHandle property instead.' 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\ras\RasConnectionNotify.cs(52,69,52,93): warning CS0618: 'WaitHandle.Handle' is obsolete: 'Use the SafeWaitHandle property instead.' 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\data\CommandBatch.cs(53,34,53,36): warning CS0168: The variable 'ex' is declared but never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\ras\RasConnection.cs(440,59,440,84): warning CS0618: 'WaitHandle.Handle' is obsolete: 'Use the SafeWaitHandle property instead.' 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\data\StoredProc.cs(58,13,58,16): warning CS0162: Unreachable code detected 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\data\StoredProc.cs(81,13,81,16): warning CS0162: Unreachable code detected 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\UcColorButton.cs(23,17,23,49): warning CS0184: The given expression is never of the provided ('KnownColor') type 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\data\QueryOptimizer.cs(258,18,258,26): warning CS0219: The variable 'sendflag' is assigned but its value is never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\Print\ReportToolbar.cs(119,30,119,32): warning CS0168: The variable 'ex' is declared but never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\UcDataSetManager.cs(1172,37,1172,39): warning CS0168: The variable 'ex' is declared but never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\Print\frmReportPreview.Designer.cs(140,56,140,64): warning CS0169: The field 'frmReportPreview.Command0' is never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\ras\frmGetConnection.cs(22,44,22,54): warning CS0649: Field 'frmGetConnection.components' is never assigned to, and will always have its default value null 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\MemoryStatisticsGparh.cs(33,13,33,30): warning CS0414: The field 'MemoryStatisticsGparh.graphMaxItemCount' is assigned but its value is never used 
1>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\forms\MemoryStatisticsGparh.cs(32,13,32,22): warning CS0414: The field 'MemoryStatisticsGparh.lineCount' is assigned but its value is never used 
1> ucx.v2 -> c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\bin\Debug\ucx.v2.dll 
2>------ Build started: Project: Timer, Configuration: Debug Any CPU ------ 
3>------ Build started: Project: pcbox.startpage, Configuration: Debug Any CPU ------ 
4>------ Build started: Project: Loader.run, Configuration: Debug Any CPU ------ 
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3258: The primary reference "c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\bin\Debug\ucx.v2.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\AlarmNotification.cs(6,13,6,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\IScheduledServiceItem.cs(2,13,2,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\pop3\RxMailMessage.cs(17,13,17,22): error CS0234: The type or namespace name 'Extension' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\ServiceTimer.cs(8,13,8,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\ServiceTimerDS.cs(4,13,4,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\synchronization\MailReceiver.cs(7,13,7,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\synchronization\MailSender.cs(8,13,8,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\synchronization\Replication.cs(6,7,6,18): error CS0246: The type or namespace name 'ICSharpCode' could not be found (are you missing a using directive or an assembly reference?) 
2>c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\Timer\synchronization\Replication.cs(7,13,7,17): error CS0234: The type or namespace name 'data' does not exist in the namespace 'pcbox' (are you missing an assembly reference?) 
+0

解決しましたか? – Peter

答えて

0

:ここ

はエラーログです

2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3258: The primary reference "c:\Users\david\Documents\Visual Studio 2017\Projects\NomalGit\ucx.v2\bin\Debug\ucx.v2.dll" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework. 

タイマーというプロジェクトで、2.0〜.NETターゲットバージョンを変更プロジェクトプロパティを開き、 "Target Framework"を変更して、

関連する問題