coreclr

Unsafe Code Compilation error in .Net Core even after setting allowunsafe flag to true in project.json

白昼怎懂夜的黑 提交于 2019-12-09 08:23:30
问题 I am using some unsafe code in my .Net core App. For that i had made this change in the project.json file "compilationOptions": { "allowUnsafe": true, } Still this error comes error CS0227: Unsafe code may only appear if compiling with /unsafe I had already gone through this already Unsafe code won't compile on Visual Studio 2015 How to call unsafe code from ASP.NET xproj 回答1: Change compilationOptions to buildOptions : "buildOptions": { "allowUnsafe": true } 回答2: In the newer *.csproj files,

.NET Core is not running in Windows 2008 Server R2

限于喜欢 提交于 2019-12-08 21:55:58
问题 I installed the DotNetCore.1.0.0.RC2-SDK.Preview1-x64.exe in my Windows 2008 R2 x64 machine. When I try to run a dotnet command the following error occurs: C:\Users\Administrator>dotnet --version Failed to load the dll from [C:\Program Files\dotnet\hostfxr.dll], HRESULT: 0x80070057 I double-checked that my OS is x64 and I'm installing the x64 version of .NET Core. Also, my installation seems to be okay, the file C:\Program Files\dotnet\hostfxr.dll exists on my machine. Searching on Google

How to configure ASP.NET Core application to use windows authentication?

本小妞迷上赌 提交于 2019-12-08 10:47:11
问题 I want to configure ASP.NET application to use different authentication depends on the environment. So for development environment I want to use Windows authentication and for all other environment I want to use Facebook authentication. I have already configured Facebook authentication for non development environment. How do I configure windows authentication for development environment? Windows authentication will only be used during development so developers does not have to login every

CS0433: The type 'List<T>' exists in both

笑着哭i 提交于 2019-12-08 05:34:02
问题 I try use .net core but I have a lot of diffrent problems. This is one of them. I use Ubuntu 14. Error code Microsoft.Dnx.Compilation.CSharp.RoslynCompilationException: /home/lukasz/Project/Commands.cs(10,16): DNX,Version=v4.5.1 error CS0433: The type 'List<T>' exists in both 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' /home/lukasz/Project/Commands.cs(10,21): DNX

Content Security Policy does not work in Internet Explorer 11

喜夏-厌秋 提交于 2019-12-07 04:11:41
问题 In my asp.net core application for each response i'm adding content security policy header. I understand that for IE, the header name is X-Content-Security-Policy and for other browsers like chrome its Content-Security-Policy The header value looks something like below where nonce is different for each response. default-src 'none'; script-src 'self' 'nonce-somerandomvalue-differnt-foreach-reasone' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; object

Make T4MVC work with ASP.NET 5

偶尔善良 提交于 2019-12-07 00:21:40
问题 According to the latest comments in this thread, .tt templates will now after all be supported in ASP.NET 5 starting with Visual Studio Update 1. Which IMHO would be great because after using T4MVC for years, I certainly don't wanna go back to using magic strings for route/view names (error prone and not refactoring-friendly). However, I can't quite get it to work with ASP.NET 5 RC and Visual Studio Professional 2015 Update 1. Here's what I've tried: Adding the T4MVC NuGet (3.16.5) to a blank

CS0433: The type 'List<T>' exists in both

与世无争的帅哥 提交于 2019-12-06 21:30:25
I try use .net core but I have a lot of diffrent problems. This is one of them. I use Ubuntu 14. Error code Microsoft.Dnx.Compilation.CSharp.RoslynCompilationException: /home/lukasz/Project/Commands.cs(10,16): DNX,Version=v4.5.1 error CS0433: The type 'List<T>' exists in both 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' /home/lukasz/Project/Commands.cs(10,21): DNX,Version=v4.5.1 error CS0433: The type 'List<T>' exists in both 'System.Collections, Version=4.0.10.0,

Referencing Library in ASP.NET Core 1.0 (vNext)

这一生的挚爱 提交于 2019-12-05 13:30:59
问题 I am learning ASP.NET Core 1.0 (vNext). With that in mind, I have a solution that is structured like this: MySolution src MyLibrary MyClass.cs project.json MyWebSite Startup.cs project.json I am successfully compiling MyLibrary from the command-line using dnu build . I ran dnu pack which generated MyLibrary.1.0.0.nupkg . There are also two folders: dnx451 and dnxcore50 which both contain MyLibrary.1.0.0.dll . I want to use MyLibrary in MyWebSite , however, I'm confused. How do I "include"

Content Security Policy does not work in Internet Explorer 11

拥有回忆 提交于 2019-12-05 08:30:14
In my asp.net core application for each response i'm adding content security policy header. I understand that for IE, the header name is X-Content-Security-Policy and for other browsers like chrome its Content-Security-Policy The header value looks something like below where nonce is different for each response. default-src 'none'; script-src 'self' 'nonce-somerandomvalue-differnt-foreach-reasone' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; object-src 'self'; connect-src 'self'; report-uri /csp/report; The application is using inline javascript on

Make T4MVC work with ASP.NET 5

﹥>﹥吖頭↗ 提交于 2019-12-05 04:55:07
According to the latest comments in this thread, .tt templates will now after all be supported in ASP.NET 5 starting with Visual Studio Update 1. Which IMHO would be great because after using T4MVC for years, I certainly don't wanna go back to using magic strings for route/view names (error prone and not refactoring-friendly). However, I can't quite get it to work with ASP.NET 5 RC and Visual Studio Professional 2015 Update 1. Here's what I've tried: Adding the T4MVC NuGet (3.16.5) to a blank ASP.NET 5 solution: nope, CoreCLR complains and no .tt files are added to project: Error NU1002 The