Commit 683f375
authored
[Microsoft.Android.Build] Use MSBuild NuGets (#118)
Context: dotnet/android#5891
I've been hitting errors running tests locally on Windows after building
with .NET 6 Preview 3:
Error Message:
System.IO.FileNotFoundException : Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Stack Trace:
at Xamarin.ProjectTools.DotNetXamarinProject.SaveProject()
at Xamarin.ProjectTools.XamarinProject.Save(Boolean saveProject) in C:\Users\Peter\source\xamarin-android\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Common\XamarinProject.cs:line 241
at Xamarin.ProjectTools.ProjectBuilder.Save(XamarinProject project, Boolean doNotCleanupOnUpdate, Boolean saveProject) in C:\Users\Peter\source\xamarin-android\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Common\ProjectBuilder.cs:line 43
at Xamarin.ProjectTools.ProjectBuilder.Build(XamarinProject project, Boolean doNotCleanupOnUpdate, String[] parameters, Boolean saveProject, Dictionary`2 environmentVariables) in C:\Users\Peter\source\xamarin-android\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.ProjectTools\Common\ProjectBuilder.cs:line 67
at Xamarin.Android.Build.Tests.WearTests.ResolveLibraryImportsWithReadonlyFiles() in C:\Users\Peter\source\xamarin-android\src\Xamarin.Android.Build.Tasks\Tests\Xamarin.Android.Build.Tests\WearTests.cs:line 28
Rather than copying the version of the MSBuild assemblies used to build
our test projects to the output directory, we should be able to use the
NuGet package content directly. These files should only be used by our
project creation APIs and as a result their version shouldn't matter.1 parent 2241489 commit 683f375
File tree
1 file changed
+4
-13
lines changed- src/Microsoft.Android.Build.BaseTasks
1 file changed
+4
-13
lines changedLines changed: 4 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 51 | | |
0 commit comments