aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

Build succeeds but does nothing #990

Open jods4 opened 7 years ago

jods4 commented 7 years ago

VS2017 RC, Feb 7th update.

I don't know how it came to this situation, but I lost a lot of time before realizing that the build was not working anymore.

Doing a Build, Run, Debug or Rebuild always displays "Build succeeded" in the status bar. But in reality, it does nothing. I deleted the bin and obj folder completely. After "building" the structure bin\Debug\net46 is there but stays empty (although VS says "build succeeded"). I tried "Clean" but it made no difference.

Once you empty the folder, after the build "succeeds" if you try to run you get a dialog box that says the .exe does not exist on disk...

dotnet build on the command line works perfectly.

mlorbetske commented 7 years ago

Hi @jods4, would you be able to share your project file?

jods4 commented 7 years ago

@mlorbetske It's a large, private solution that I can't share. Is there anything else I could do to help? Extract some logs maybe?

mlorbetske commented 7 years ago

Mainly I'm looking for a few things within the csproj file itself - attributes of the opening project tag, any properties that change the globs that should influence compilation, any <xxx Remove=... /> elements in any item groups, TargetFramework(s) and RuntimeIdentifier(s) properties & any <PackageReference /> elements that reference Microsoft.NET.Sdk (or Microsoft.NET.Sdk.{something}) packages.

jods4 commented 7 years ago

No problem I can post that later when I am at work.

jods4 commented 7 years ago

I have Lightweight Solution Loading enabled.

I have a global.json at the root of solution, with:

{
  "sdk": {
    "version": "1.0.0-preview1-002702"
  }
}

Here's my project .csproj:

<Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0">
  <PropertyGroup>
    <Version>2.6.0-svn</Version>
    <OutputType>Exe</OutputType>
    <TargetFramework>net46</TargetFramework>
    <RuntimeIdentifier>win7-x86</RuntimeIdentifier>
    <RootNamespace>****.***</RootNamespace>
    <Prefer32Bit>True</Prefer32Bit>
    <UserSecretsId>aspnet5-***-c2266f83-dbec-4f0b-98a7-6b49ff8c34b8</UserSecretsId>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Identity" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Owin" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.WebSockets.Server" Version="0.1.0-rc2-final" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.0-rc2-final" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.0.0-rc2-final" />
    <PackageReference Include="Aspose.Cells" Version="8.8.0" />
    <PackageReference Include="Dapper" Version="1.42" />
    <PackageReference Include="EntityFramework" Version="6.1.3" />
    <PackageReference Include="Hangfire.Core" Version="1.5.4" />
    <PackageReference Include="Hangfire.Dashboard.Authorization" Version="2.1.0" />
    <PackageReference Include="Oracle.ManagedDataAccess" Version="12.1.24160419" />
    <PackageReference Include="Oracle.ManagedDataAccess.EntityFramework" Version="12.1.2400" />
    <PackageReference Include="RefactorThis.GraphDiff" Version="2.0.1" />
    <PackageReference Include="SmartFormat.NET" Version="1.6.1" />
    <PackageReference Include="Sybase.AdoNet4.AseClient" Version="4.157.401.0" />
    <PackageReference Include="NLog" Version="4.2.3" />
    <PackageReference Include="NLog.Schema" Version="4.2.3" />
    <ProjectReference Include="../Hangfire.Oracle/Hangfire.Oracle.csproj" />
    <ProjectReference Include="../EncryptedEnvironmentVariables/EncryptedEnvironmentVariables.csproj" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net46'">
    <Reference Include="System.Data" Version="4.0.0.0" />
    <Reference Include="System.Drawing" Version="4.0.0.0" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Properties\Aspose.Cells.lic">
      <LogicalName>***.Properties.Aspose.Cells.lic</LogicalName>
    </EmbeddedResource>
    <!-- For user secrets id, until we migrate to newer fx -->
    <!--<Content Include="project.json" CopyToOutputFolder="PreserveNewest" />
    <Content Include="config.json" CopyToOutputFolder="PreserveNewest" />-->
    <Content Include="NLog.config" CopyToOutputFolder="PreserveNewest" />
    <Content Include="index.versioned.html" CopyToOutputFolder="PreserveNewest" />
  </ItemGroup>
  <ItemGroup>
    <Compile Update="Data\CaseSensitiveOracleConnection.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Update="Data\WrappedOracleConnection.cs">
      <SubType>Component</SubType>
    </Compile>
  </ItemGroup>
</Project>

Most of it was written by hand by me. I have no idea why VS added the last two files as Component.

mlorbetske commented 7 years ago

One more piece of information that may help with this - could you go to Tools -> Options -> Projects and Solutions -> Build and Run and change the MSBuild project build output verbosity to diagnostic and share the log? If you'd feel more comfortable sharing over mail, you can send it to me at mlorbe at microsoft dot com

jods4 commented 7 years ago

Sorry I couldn't find time for that today. I will try to provide you that log next week.

jods4 commented 7 years ago

Here's the output with Lightweight Solution Load enabled:

Build started ...
Build Failure. Error: 'path' cannot be an empty string ("") or start with the null character.
Parameter name: path
========== Build: 0 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Calculating project dependencies...
Calculating project dependencies...

When Lightweight Solution Load is disabled, I have no issue. Log starts with

1>------ Build started: Project: Hangfire.Sql, Configuration: Debug Any CPU ------
2>------ Build started: Project: EncryptedEnvironmentVariables, Configuration: Debug Any CPU ------
2>Build started 14.03.2017 14:27:49.
2>Environment at start of build:
2>ALLUSERSPROFILE                = C:\ProgramData
...

And goes on...

jods4 commented 7 years ago

Also: I am now on VS 2017 RTM, the output above comes from RTM and the bug is still there.