Skip to content

Instantly share code, notes, and snippets.

@jaredcnance
Last active August 8, 2018 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredcnance/f0ff6e8d7efda2bd9578b8dd6e4cfcfd to your computer and use it in GitHub Desktop.
Save jaredcnance/f0ff6e8d7efda2bd9578b8dd6e4cfcfd to your computer and use it in GitHub Desktop.
Example for switching between Package and Project References
<!--
export WORKSPACE_PATH=~/dev
- figure out if it is possible to create delimited lists in msbuild properties
e.g. export WORKSPACE_PROJECT_PATHS=~/dev/Bar/src/Bar.csproj;~/dev/Foo/Foo.csproj
-->
<PropertyGroup>
<JsonApiDotNetCoreRelativePath>/JsonApiDotNetCore/src/JsonApiDotNetCore.csproj<JsonApiDotNetCoreRelativePath>
</PropertyGroup>
<ItemGroup Condition="Exists('$(WORKSPACE_PATH)$(JsonApiDotNetCoreRelativePath)')">
<ProjectReference Include="$(WORKSPACE_PATH)$(JsonApiDotNetCoreRelativePath)" />
</ItemGroup>
<ItemGroup Condition="!Exists('$(JsonApiDotNetCorePath)')">
<PackageReference Include="JsonApiDotNetCorePath" Version="$(JsonApiDotNetCoreVersion)" />
</ItemGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment