Remco;1529 wrote:If all is working correctly, you should see the files in both your NCrunch workspace and in the MSTest workspace (the 'Out' directory).
If you set your 'log verbosity' to detailed (NCrunch global configuration), then clicking on the test task in the processing queue should give you detailed information about which files were copied.
Setting to Verbosity does not work for me.
I modified my unit test to output the folder it's looking for:
Code:
[TestClass]
public class NhCRUDTests
{
const string NH_TEST_DB = "NhTestDb.sdf";
[DeploymentItem(NH_TEST_DB)]
[ClassInitialize]
public static void FixtureSetup(TestContext context)
{
Assert.IsTrue(File.Exists(NH_TEST_DB), "deployment failed: " + Directory.GetCurrentDirectory() + "\\" + NH_TEST_DB);
new ConfigurationHelper().Configure();
What I get is an output folder where the file is missing:
C:\Users\Robert\AppData\Local\NCrunch\5584\12\TestResults\6640ad3e-27ec-43d6-b933-bb5307679697\Out
What I see when looking at the advanced workspace folder is this:
C:\Users\Robert\AppData\Local\NCrunch\5584\12\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests
The sdf file does exist in the workspace folder
As you can see the Deployment value exists
Deployment is enabled through the Test Settings
The unit test works fine directly
The NCruch additional files is set to "NhTestDb.sdf" and reading the output log, it appears that it goes to the wrong place, it's going to the bin\Debug folder, but not to the actual running test folder
additional entries from the output log
Code:
Target "_CopyOutOfDateSourceItemsToOutputDirectory" skipped, due to false condition; ( '@(_SourceItemsToCopyToOutputDirectory)' != '' ) was evaluated as ( '' != '' ).
Using "Copy" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Copying file from "C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\NhTestDb.sdf" to "bin\Debug\NhTestDb.sdf".
Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
Input files: App.config
and the last reference before the failed unit test:
Code:
Using "Delete" task from assembly "Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "WriteLinesToFile" skipped, due to false condition; ('@(_CleanUnfilteredPriorFileWrites)'!='@(_CleanUniqueRemainingFileWritesAfterIncrementalClean)') was evaluated as ('C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\ResolveAssemblyReference.cache;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\NhTestDb.sdf;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.dll.config;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.dll;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.pdb;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\Sfc.Persistence.Nh.UnitTests.dll;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\Sfc.Persistence.Nh.UnitTests.pdb'!='C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\ResolveAssemblyReference.cache;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\NhTestDb.sdf;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.dll.config;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.dll;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\bin\Debug\Sfc.Persistence.Nh.UnitTests.pdb;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\Sfc.Persistence.Nh.UnitTests.dll;C:\Users\Robert\AppData\Local\NCrunch\5584\32\Source\Persistence.Providers.NHibernate\Sfc.Persistence.Nh.UnitTests\obj\Debug\Sfc.Persistence.Nh.UnitTests.pdb').
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '' and ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or '$(_AssemblyTimestampBeforeCompile)' != '$(_AssemblyTimestampAfterCompile)')) was evaluated as ('' != '' and ('' != 'OnOutputUpdated' or '' != '')).
#NCRUNCH_OutputFile='bin\Debug\Sfc.Persistence.Nh.UnitTests.dll'