novotnyllc / MSBuildSdkExtras

Extra properties for MSBuild SDK projects
MIT License
348 stars 42 forks source link

Errors do not appear in error list #49

Closed bradphelan closed 6 years ago

bradphelan commented 6 years ago

Using VS 15.6.2

and the following project file

<Project Sdk="MSBuild.Sdk.Extras/1.2.2">
  <PropertyGroup>
    <TargetFramework>net461</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <None Remove="MultilingualResources\WeinCad.Controls.de.xlf" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Appccelerate.AsyncModule" Version="1.0.98" />
    <PackageReference Include="Appccelerate.Fundamentals" Version="2.8.0" />
    <PackageReference Include="Appccelerate.StateMachine" Version="4.4.0" />
    <PackageReference Include="Castle.Core" Version="3.2.0" />
    <PackageReference Include="Expression.Blend.Sdk" Version="1.0.2" />
    <PackageReference Include="Fody" Version="2.1.3" />
    <PackageReference Include="FSharp.Core" Version="4.2.3" />
    <PackageReference Include="FluentValidation" Version="7.1.1" />
    <PackageReference Include="I18N.Reactive" Version="4.1.2" />
    <PackageReference Include="LanguageExt.Core" Version="2.1.32" />
    <PackageReference Include="MahApps.Metro" Version="1.5.0" />
    <PackageReference Include="Microsoft.WindowsAPICodePack-Core" Version="1.1.0.2" />
    <PackageReference Include="Microsoft.WindowsAPICodePack-Shell" Version="1.1.0.0" />
    <PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
    <PackageReference Include="Ninject" Version="3.2.2.0" />
    <PackageReference Include="Ninject.Extensions.NamedScope" Version="3.2.0.0" />
    <PackageReference Include="Serilog" Version="2.6.0" />
    <PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
    <PackageReference Include="System.Interactive" Version="3.1.1" />
    <PackageReference Include="System.ValueTuple" Version="4.4.0" />
    <PackageReference Include="Unofficial.Blend.Interactivity" Version="1.0.0" />
    <PackageReference Include="Weingartner.Exceptional" Version="1.7.4-ci.2" />
    <PackageReference Include="Weingartner.Json.Migration" Version="311.0.0" />
    <PackageReference Include="Weingartner.ReactiveUI.Fody" Version="2.3.0-alpha.10" PrivateAssets="All" />
    <PackageReference Include="devDept.Eyeshot" Version="11.0.465" />
  </ItemGroup>
  <ItemGroup>
    <Reference Include="ReachFramework" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Safenet\Weingartner.Products\Weingartner.Products.fsproj" />
    <ProjectReference Include="..\Safenet\Weingartner.Safenet\Weingartner.Safenet.fsproj" />
    <ProjectReference Include="..\Weingartner.Controls\Weingartner.Controls.csproj" />
  </ItemGroup>
  <ItemGroup>
    <Resource Include="View\WeinLogo.gif" />
  </ItemGroup>
  <ItemGroup>
    <XliffResource Include="MultilingualResources\WeinCad.Controls.de.xlf" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.de.resx" />
    <Compile Update="Properties\Resources.resx.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>I18NReactive</Generator>
      <LastGenOutput>Resources.resx.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
</Project>

image

and the following code error.

devenv_2018-03-19_12-34-13

the error does not appear in the error list. It appears if the intellisense source is used but not the build.

https://dl.dropboxusercontent.com/s/fwwj61z8g6h3bqg/2018-03-19_12-33-35.mp4

I can't send the entire project as it is not open source. If you need me to try create a fully standalone reproduction then let me know. Maybe it is obvious what the problem is from the description.

DanFTRX commented 6 years ago

I have the same issue.

clairernovotny commented 6 years ago

If there's a way to get a tiny repro that demonstrates this, it'll help.

DanFTRX commented 6 years ago

ExampleApp.zip This reproduces the issue for me.

DanFTRX commented 6 years ago

It appears to only happen when the xaml exists in a library output project and not in the executable output project.

DanFTRX commented 6 years ago

Was the example app I uploaded able to reproduce it for you locally?

DanFTRX commented 6 years ago

Any progress on this?

MrJul commented 6 years ago

I'm not sure if MSBuildSdkExtras can do anything about it.

To me, it's the new project system not showing errors for projects it doesn't know anything about, and since the XAML compilation use a temp project for its first pass, we get this behaviour.

Nirmal4G commented 6 years ago

I think I fixed with the recent commit on my PR. I checked with your repro. It's working as expected.

@DanFTRX so, Can you check again (just for confirmation)?

YairHalberstadt commented 5 years ago

I'm getting this same issue with SDK 1.6.68, VS 15.9.7, .Net 472 However I'm guessing that once VS 2019 comes out on 2nd April I will be able to use microsoft.NET.Sdk.WindowsDesktop with .Net 472, in which case I can just wait.

YairHalberstadt commented 5 years ago

I've managed to reproduce the issue with the sample project. It occurs when using the new style csproj:

<Project Sdk="MSBuild.Sdk.Extras/1.6.68">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <ExtrasEnableWpfProjectSetup>true</ExtrasEnableWpfProjectSetup>
  </PropertyGroup>
  <ItemGroup>
    <Folder Include="Properties\" />
  </ItemGroup>
</Project>

ExampleApp.zip

I've opened this in a new issue: #157