2017-07-26 100 views
0

我是新來的C#和它的第一個項目,並希望瞭解完整的代碼流。我正在使用sharp IDE 4.4來運行項目。C#項目正在建設,但它不運行

當我運行它,打開本地主機和消息appears- 確保您有正確的網址:http://localhost:52440

輸出,當我建立一個項目 -

Build started. 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5) : Warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5) : Warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\\mscorlib.dll", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5) : Warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5) : Warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.EnterpriseServices", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5) : Warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Web", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. 
Build finished successfully. (00:00:00.5339523) 
+0

將您的輸出平臺更改爲X86 –

+0

當我生成一個項目時,我收到一個錯誤 - 沒有爲項目「ASPV.csproj」設置OutputPath屬性。請檢查以確保您已爲該項目指定了Configuration和Platform的有效組合。配置='發佈'平臺='X86'。如果某個其他項目試圖按照此項目的項目對項目引用,此項目已卸載或未包含在解決方案中,並且引用項目不使用相同或等效項目構建,也可能會出現此錯誤配置或平臺。 – Raz

回答

0

我不t知道你正在使用哪個IDE,但是你想要做一個asp \ mvc站點項目,還是你要在其中運行可執行文件的桌面項目?

如果您正在嘗試執行桌面項目並運行它,那麼您可能選擇了錯誤的項目類型。如果你想運行一個網站,那麼你首先應該看看項目路線和網絡配置,看看是否一切順利。

+0

它是一個web項目,我剛剛在「Sharpdevelop」IDE中打開了一個解決方案,它在Visual Studio中工作得非常好,但由於許可證問題,我嘗試在Sharp Develop IDE中配置相同的項目。它應該像在Visual Studio中那樣打開並運行,但它不會作爲本地主機運行,並且在構建時會拋出我的問題中提到的警告。 – Raz

+0

你也可以嘗試使用社區版本的visual studio它可以免費使用 –

相關問題