我想将我的网站从dotnet核心rc1迁移到dotnet核心rc2,但是我遇到了一个错误,然后我尝试运行一个小测试,但它也没有为我工作。 这是我的睾丸中:https://github.com/ricardoalcantara/WebApplicationBasic在Linux上使用net451的asp.net-core MVC rc2
我的环境是:
- 的Debian 8.4
- 单4.2.3
- DOTNET 1.0.0-preview1-002702
我需要在“框架”之上运行它:“net451”,因为我的主项目需要很少的库,它仍然只在该平台上运行,所以我正在使用此命令行运行:
dotnet run --framework .NETFramework,Version=v4.5.1
实际上它运行,但是当我尝试访问本地主机:5000主要抛出一个长堆栈错误与消息:
z2cw6v06.4ja(43,10): error CS0518: Predefined type 'System.Object' is not defined or imported
z2cw6v06.4ja(43,50): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
z2cw6v06.4ja(43,10): error CS0518: Predefined type 'System.Void' is not defined or imported
z2cw6v06.4ja(45,10): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
z2cw6v06.4ja(45,10): error CS0518: Predefined type 'System.Object' is not defined or imported
z2cw6v06.4ja(45,50): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
z2cw6v06.4ja(45,10): error CS0518: Predefined type 'System.Void' is not defined or imported
z2cw6v06.4ja(47,10): error CS0012: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
z2cw6v06.4ja(47,10): error CS0518: Predefined type 'System.Object' is not defined or imported
z2cw6v06.4ja(47,50): error CS0012: The type 'Attribute' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
有人可以帮我解决这个问题?
Obs .:它适用于Windows。
尝试'DOTNET运行--framework net451' –
还不行,但我相信我找到了一个解决办法,以暂时解决这个问题。我会在测试完成后更新它。 –