Есть консольное приложение, сборка походит в Trevis, решил написать тесты, следовательно, нужно внести изменения в файле .travis.yml иерархия папок такова:
-- Project.sln
-- .travis.yml
---- Project
---- Project.Test
Подключил библиотеку xUnit, локально все собирается, тесты проходят, но в Trevis сборка падает. На данный момент файл .travis.yml выглядит так:
language: csharp
solution: Project.sln
install:
- travis_retry nuget restore -source "https://www.nuget.org/api/v2" Project.sln
script:
- xbuild Project.sln
- mono ./packages/xunit.runner.console*/tools/net452/xunit.console.exe ./Project.Test/bin/Debug/Project.Test.dll
Все библиотеки и файлы присутствуют. В логах Travis'a нашел следующее:
Errors: /home/travis/build/Brekhin/CommandProjectTest/ConcertNotifier.sln (default targets) -> (Build target) -> /home/travis/build/Brekhin/CommandProjectTest/ConcertNotifier.Test/ConcertNotifier.Test.csproj (default targets) -> /usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> UnitTest1.cs(2,30): error CS0234: The type or namespace name 'TestTools' does not exist in the namespace 'Microsoft.VisualStudio' (are you missing an assembly reference?) UnitTest1.cs(6,6): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?) UnitTest1.cs(6,6): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?) UnitTest1.cs(9,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?) UnitTest1.cs(9,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?) 1 Warning(s) 5 Error(s) Time Elapsed 00:00:02.4604190
Можете сказать, в чем дело и как решить?
Сборка персонального компьютера от Artline: умный выбор для современных пользователей