๋ค์์ ์ค์ ๋ต๋ณ์ด ์๋ CLI ๋ฐ MVC ๋ฆฌํฌ์งํ ๋ฆฌ https://github.com/aspnet/Mvc/issues/4663 ๋ฐ https://github.com/dotnet/cli/issues/3091 ์ ์ค๋ ๋์ ๋๋ค. VS Tooling ๋ฒ๊ทธ๋ผ๊ณ ์๊ฐํ์ต๋๋ค.
Nuget ํจํค์ง๋ฅผ ํตํด ๊ธฐ๋ณธ dll์ ์ฐธ์กฐํ๋ asp.net ํ๋ก์ ํธ๊ฐ ์์ต๋๋ค. ์ด ๋ค์ดํฐ๋ธ DLL์ x86์ฉ์ผ๋ก๋ง ๋น๋๋ฉ๋๋ค. buildOptions๋ฅผ ์ค์ ํ๋๋ก project.json์ ๋ณ๊ฒฝํ์ต๋๋ค.
"ํ๋ซํผ": "x86"
๊ทธ๋ฌ๋ Visual Studio๋ฅผ ํตํด ์ด asp.net ํ๋ก์ ํธ๋ฅผ ๋น๋ํ๋ฉด "win7-x86"์ ๋ฐ๋๋๋ "bin\Debug\net46\win7-x64"๊ฐ ์์ฑ๋ฉ๋๋ค. ๊ฒฐ๊ณผ ".exe" ํ์ผ์ ์คํํ๋ฉด ์ถฉ๋์ด ๋ฐ์ํฉ๋๋ค.
"dotnet build -r win7-x86"์ ์ฌ์ฉํ๋ ค๊ณ ์๋ํ๋๋ฐ ์ฌ๋ฐ๋ฅธ ํด๋ "bin\Debug\net46\win7-x86"์ ๋ง๋ ๋ค์ ".exe" ํ์ผ์ ์คํํ ์ ์์ต๋๋ค.
์ฌ์ ํ x86 ๋ชจ๋์์ ์์ฉ ํ๋ก๊ทธ๋จ์ ํ ์คํธํ ์ ์์ต๋๋ค.
๊ทธ๋ฐ ๋ค์ "VS 2015 Tooling Preview"๋ฅผ ํตํด ์ค์น๋ Microsoft .NET Code 1.0.0 RC2 - SDK Preview 1(x64)์ ์ ๊ฑฐํ๊ณ "x86"์ ์ค์นํ๋๋ฐ ๋ชจ๋ ๊ฒ์ด ์ ๋๋ก ์๋ํ๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ณ์ง ์๋ค๊ณ ์๊ฐํฉ๋๋ค. x64 ๋ฐ x86์ ์ค์นํ ์ ์๋ ์ต์ ์ด ์์ด์ผ ํ๊ณ ํด๋น buildOption์ ํตํด dotnet์ ์ปดํ์ผ ๋ฐฉ๋ฒ์ ์๋ฆด ์ ์์ด์ผ ํฉ๋๋ค. ํ๋ก์ ํธ ์์ฑ์์ ๋น๋ ์ต์ ์ ์ค์ ํ๋ MSBuild ๋ฐ ASP.Net ํ๋ก์ ํธ์ ๊ฐ์ต๋๋ค.
@BillHiebert ์ด๊ฒ์ ๋ช ์ฃผ ์ ์ ์ ๊ธฐ๋ ๋น๋ ๋ฌธ์ ์ ์ ์ฌํ๊ฒ ๋ค๋ฆฝ๋๋ค. cli ์ ํ์ธ๊ฐ์?
@sayedihashimi ๋ https://github.com/dotnet/cli/issues/3091 ์์ ์์ ์ฌํญ์ ์ฐพ์ ๊ฒ ๊ฐ์ต๋๋ค.
์ ๋ฐ์ดํธ 1: ์๋ชป๋ ๊ฒฝ๋ณด, ์์ ์ฌํญ์ด ์์ง๋ง x86 SDK๋ฅผ ์ค์นํฉ๋๋ค(x64 ์ดํ ๋๋ x64 ์ ๊ฑฐ).
TFS: 224821
์ด๊ฒ์ ๋ด๋ถ TFS์ ์ถ๊ฐํ์ต๋๋ค. ๊ณง ์ฌ๊ธฐ์ ํ์ ๋๋ฆฌ๊ฒ ์ต๋๋ค.
ASP.NET Core 1.0 ๋ฐ Visual Studio 2015 ์ ๋ฐ์ดํธ 3 ์์ ๋์ผํ ๋ฌธ์ ๋ฅผ ์ฌํํ ์ ์์ต๋๋ค. ์ด๋ฅผ ์ฌํํ๋ ๊ฐ์ฅ ์ฌ์ด ๋ฐฉ๋ฒ์ Visual Studio๋ฅผ ์ด๊ณ ์ ASP.NET Core ์น ์์ฉ ํ๋ก๊ทธ๋จ(.NET Framework) ํ๋ก์ ํธ๋ฅผ ๋ง๋ค๊ณ "๋น" ํ๋ก์ ํธ ํ ํ๋ฆฟ์ ์ ํํ๋ ๊ฒ์ ๋๋ค. ๋ณ๊ฒฝํ์ง ์๊ณ ํ๋ก์ ํธ๋ฅผ ์คํํ๊ณ "Hello World!" ์น ํ์ด์ง๊ฐ ํ์๋ฉ๋๋ค. /bin/Debug/net452/win7-x64 ํด๋๊ฐ ์์ฑ๋ฉ๋๋ค.
์ด์ ์น ์ฑ์ ์ค์งํ๊ณ Debug ํด๋๋ฅผ ์ญ์ ํ ๋ค์ project.json์ ์ด๊ณ "platfrom": "x86"์ buildOptions ์น์ ์ ์ถ๊ฐํฉ๋๋ค.
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"platform": "x86"
},
์์ฉ ํ๋ก๊ทธ๋จ์ ๋ค์ ์คํํ๋ฉด Program.cs์์ host.Run()์ด ํธ์ถ๋ ๋ Microsoft.AspNetCore.Server.Kestrel.dll์์ System.AggregateException์ด throw๋ฉ๋๋ค.
public class Program
{
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run(); // <= this throws an exception when platform is set to x86
}
}
๋ํ /bin/Debug/net452/win7-x86 ๋์ /bin/Debug/net452/win7-x64๊ฐ ์์ฑ๋ฉ๋๋ค.
์์ ์ฑ์ ์ํด ๋ด global.json ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
}
์ํธ ์ฐธ์กฐ: https://github.com/aspnet/Home/issues/1624
VS 2017์์ ์ด๊ฒ์ ํ ์คํธํ ์ฌ๋์ด ์์ต๋๊น? VS 2017 RTM์์ ์์ ์ ๊ธฐ๋ํ ์ ์์ต๋๊น?
VS2017์ด RTM /cc @nguerrera ๋ก ์ ํ๋๋ฉด ์์ ๋์ด์ผ ํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
VS2017์ด RTM /cc @nguerrera ๋ก ์ ํ๋๋ฉด ์์ ๋์ด์ผ ํฉ๋๋ค.