Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Load assemblies with nuget package dependencies in the PSharpTester #348

Open
pdeligia opened this issue Sep 5, 2018 · 1 comment
Open
Labels
bug Something isn't working tools Request or feature related to the tools

Comments

@pdeligia
Copy link
Contributor

pdeligia commented Sep 5, 2018

There is an issue currently (that @shazqadeer faces) where a NuGet dependency is not loaded by the tester, resulting into a System.IO.FileNotFoundException.

This is related to this known issue.

We should see if we can come up with a workaround (e.g. track missing dependencies and load them), that works well, until there is an official API/solution. However this might be too complex, so we need to investigate if its possible.

@pdeligia pdeligia added bug Something isn't working tools Request or feature related to the tools labels Sep 5, 2018
@pdeligia
Copy link
Contributor Author

pdeligia commented Sep 6, 2018

The following workaround seems to work. Add in your test project file the following line:

<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>

Like this:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <Description>The PingPong P# sample.</Description>
    <AssemblyName>PingPong</AssemblyName>
    <RootNamespace>PingPong</RootNamespace>
    <TargetFrameworks>netcoreapp2.1</TargetFrameworks>
    <OutputType>Exe</OutputType>
    <OutputPath>.\bin\</OutputPath>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\External\PSharp\Source\Core\Core.csproj" />
  </ItemGroup>
</Project>

Our suggestion is to use this workaround until we have a better solution. Keeping this issue open for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working tools Request or feature related to the tools
Projects
None yet
Development

No branches or pull requests

1 participant