title: DotNetCore 1.1 application compilation error: CS2007: Unrecognized option: '-' Web C:\..Microsoft.DotNet.Com
body: <p>I am getting a compilation error when I try to compile 1.1 application. I was converting this application from Rc1 to 1.1, made necessary changes to project files, packages restored without errors, but while compiling it is giving this error.</p>
  
  <p>Also the solution had other web projects, referring the same common class libraries, all got compiled without any error...</p>
  
  <p>In vs2015(on win10) , I installed these packages:</p>
  
  <p>DotNetCore.1.0.1-VS2015Tools.Preview2.0.3.exe</p>
  
  <p>DotNetCore.1.0.1-SDK.1.0.0.Preview2-003131-x64.exe</p>
  
  <pre><code>------ Rebuild All started: Project: MyCommon.Model, Configuration: Debug Any CPU ------
    C:\Program Files\dotnet\dotnet.exe build "c:\work\proj\Trunk\Gsb\MyCommon.Model" --configuration Debug --no-dependencies --no-incremental
    Project MyCommon.Model (.NETStandard,Version=v1.6) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
    Compiling MyCommon.Model for .NETStandard,Version=v1.6
    Compilation succeeded.
        0 Warning(s)
        0 Error(s)
    Time elapsed 00:00:02.1608612
     (The compilation time can be improved. Run "dotnet build --build-profile" for more information)
  ------ Rebuild All started: Project: MyCommon.Utilities, Configuration: Debug Any CPU ------
    C:\Program Files\dotnet\dotnet.exe build "c:\work\proj\Trunk\Gsb\MyCommon.Utilities" --configuration Debug --no-dependencies --no-incremental
    Project MyCommon.Utilities (.NETStandard,Version=v1.6) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
    Compiling MyCommon.Utilities for .NETStandard,Version=v1.6
    Compilation succeeded.
        0 Warning(s)
        0 Error(s)
    Time elapsed 00:00:02.0359443
     (The compilation time can be improved. Run "dotnet build --build-profile" for more information)
  ------ Rebuild All started: Project: Gsbr.Web, Configuration: Debug Any CPU ------
    C:\Program Files\dotnet\dotnet.exe build "c:\work\proj\Trunk\Gsb\Gsbr.Web" --configuration Debug --no-dependencies --no-incremental
    Project Gsbr.Web (.NETCoreApp,Version=v1.1) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.
    Compiling Gsbr.Web for .NETCoreApp,Version=v1.1
    C:\Program Files\dotnet\dotnet.exe compile-csc @c:\work\proj\Trunk\Gsb\Gsbr.Web\obj\Debug\netcoreapp1.1\dotnet-compile.rsp returned Exit Code 1
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets(262,5): error : c:\work\proj\Trunk\Gsb\Gsbr.Web\error CS2007: Unrecognized option: '-'
    Compilation failed.
        0 Warning(s)
        1 Error(s)
    Time elapsed 00:00:33.7698291
  ========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========
  </code></pre>
  
  <p>project.json is like this:</p>
  
  <pre><code>{
    "version": "1.0.0-*",
  
    "dependencies": {
      "Microsoft.NETCore.App": {
        "version": "1.1.0",
        "type": "platform"
      },
      "Microsoft.AspNetCore.Diagnostics": "1.1.0",
      "Microsoft.AspNetCore.Mvc": "1.1.0",
      "Microsoft.AspNetCore.Razor.Tools": {
        "version": "1.1.0-preview4-final",
        "type": "build"
      },
      "Microsoft.AspNetCore.Routing": "1.1.0",
      "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
      "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
      "Microsoft.AspNetCore.StaticFiles": "1.1.0",
      "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
      "Microsoft.Extensions.Configuration.Json": "1.1.0",
      "Microsoft.Extensions.Logging": "1.1.0",
      "Microsoft.Extensions.Logging.Console": "1.1.0",
      "Microsoft.Extensions.Logging.Debug": "1.1.0",
      "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0",
      "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0",
      "Microsoft.AspNetCore.Authorization": "1.1.0",
      "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0"  ,  
      "Microsoft.Extensions.Configuration.FileExtensions": "1.1.0",
      "Microsoft.Extensions.DependencyInjection": "1.1.0",    
      "MyCommon.Model": "1.0.0-*",
      "MyCommon.Utilities": "1.0.0-*",
      "Microsoft.AspNetCore.Http": "1.1.0",
      "Newtonsoft.Json": "9.0.1",
      "Telerik.UI.for.AspNet.Core": "2017.1.118",
      "Microsoft.AspNetCore.Session": "1.1.0",
      "Microsoft.AspNetCore.Mvc.TagHelpers": "1.1.0",
      "System.Net.Http": "4.3.0"
    },
  
  
    "tools": {
      "BundlerMinifier.Core": "2.0.238",
      "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
      "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final"
    },
  
    "frameworks": {
      "netcoreapp1.1": {
        "imports": [
          "dotnet5.6",
          "portable-net45+win8"
        ]
      }
    },
  
    "buildOptions": {
      "emitEntryPoint": true,
      "warningsAsErrors": true,
      "preserveCompilationContext": true,
      "embed": "Views/**",
      "compile": {
        "exclude": [ "wwwroot", "node_modules" ] 
      }
    },
  
    "runtimeOptions": {
      "configProperties": {
        "System.GC.Server": true
      }
    },
  
    "publishOptions": {
      "include": [
        "wwwroot",
        "**/*.cshtml",
        "appsettings.json",
        "Config/*.json",
        "web.config"
      ]
    },
  
    "scripts": {
      "prepublish": [ "bower install", "dotnet bundle" ],
      "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
    }
  }
  </code></pre>
  
  <p><code>project.json</code> or <code>Startup.cs</code> does not show any errors.</p>
  
  <p>what am I doing wrong? what could be causing the error?</p>