Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Empty Solution in Visual Studio 2017 #1112

Description

@giovannidegani

Hi. I have cloned the repo and build the latest dev branch of the yo generator, installed in my system and generated an react-redux project. After opening the .csproj file in VS 2017 15.3 preview ( the same happens with 15.2 ) Community edition, I actually get an empty solution ( I have dotnetcore sdk 2.0.0-preview2 installed in my windows machine ).

Any ideas ?

image

This is the .csproj file

<Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0">
  <PropertyGroup>
    <TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
    <TargetFramework Condition="'$(TargetFrameworkOverride)' != ''">TargetFrameworkOverride</TargetFramework>
    <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
    <TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
    <IsPackable>false</IsPackable>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>2.0</OldToolsVersion>
  </PropertyGroup>
  <ItemGroup Condition="'$(TargetFrameworkOverride)' == ''">
    <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0-rtm-26219" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFrameworkOverride)' != ''">
    <PackageReference Include="Microsoft.AspNetCore" Version="2.0.0-rtm-26219" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0-rtm-26219" />
    <PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="2.0.0-rtm-26219" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.0.0-rtm-26219" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0-rtm-26219" />
  </ItemGroup>
  <ItemGroup>
    <!-- Files not to publish (note that the 'dist' subfolders are re-added below) -->
    <Content Remove="ClientApp\**" />
  </ItemGroup>
  <!--/-:cnd:noEmit -->
  <Target Name="DebugRunWebpack" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('wwwroot\dist') ">
    <!-- Ensure Node.js is installed -->
    <Exec Command="node --version" ContinueOnError="true">
      <Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
    </Exec>
    <Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
    <!-- In development, the dist files won't exist on the first run or when cloning to
         a different machine, so rebuild them if not already present. -->
    <Message Importance="high" Text="Performing first-run Webpack build..." />
    <Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js" />
    <Exec Command="node node_modules/webpack/bin/webpack.js" />
  </Target>
  <!--/+:cnd:noEmit -->
  <Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
    <!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
    <Exec Command="npm install" />
    <Exec Command="node node_modules/webpack/bin/webpack.js --config webpack.config.vendor.js --env.prod" />
    <Exec Command="node node_modules/webpack/bin/webpack.js --env.prod" />
    <!-- Include the newly-built files in the publish output -->
    <ItemGroup>
      <DistFiles Include="wwwroot\dist\**; ClientApp\dist\**" />
      <ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
        <RelativePath>%(DistFiles.Identity)</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
      </ResolvedFileToPublish>
    </ItemGroup>
  </Target>
</Project>`

Activity

  1. SteveSandersonMS commented on Jul 13, 2017

    @SteveSandersonMS
    Member

    If you want to use the sources in this repo directly, you now need the latest .NET Core 2.0 Preview 3 SDK installed before you open VS: https://github.com/dotnet/cli/tree/release/2.0.0#installers-and-binaries

  2. mcquiggd commented on Aug 9, 2017

    @mcquiggd

    @SteveSandersonMS

    I followed the link and there does not seem to be such a beast as .NET Core 2.0 Preview 3 SDK.

    As those are daily builds, it's already up to version 2.0.1-servicing-006924.

    As I couldn't find .NET Core 2.0 Preview 3 SDK anywhere, I downloaded the .NET Core 2.0 Preview 2 SDK, and had the same problem as @tiefox; to get the project to load I changed one line in the cs.proj file:

    Change:
    <TargetFramework Condition="'$(TargetFrameworkOverride)' == ''">netcoreapp2.0</TargetFramework>
    To:
    <TargetFramework>netcoreapp2.0</TargetFramework>

    The project will now load.

    But... @SteveSandersonMS is there a download of the version of the SDK you are using available somewhere, so we can run this 'as is'?

    P.S was really pleased to see the current dev branch react-redux template run without any TypeScript errors ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions