Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

The "ResolveLibraryProjectImports" task failed unexpectedly. File "...\R.txt" is in use

$
0
0

Hi

Xamarin Forms build fails here with the following error:

The "ResolveLibraryProjectImports" task failed unexpectedly.
System.IO.IOException: The process cannot access the file 'C:\Temp\XamarinBeispiel\App1\App1\App1.Android\obj\Debug\80\lp\8\jl\bin\R.txt' because it is being used by another process.

This happens with all new created Xamarin Forms Apps. Reinstalling Visual Studio and Xamarin did not help.

Has someone else already encountered this problem? Any solutions to that problem?

Here the build output:

Restoring NuGet packages...
To prevent NuGet from restoring packages during build, open the Visual Studio Options dialog, click on the NuGet Package Manager node and uncheck 'Allow NuGet to download missing packages during build.'
Restoring packages for C:\Temp\XamarinExample\App1\App1\App1\App1.csproj...
Restoring packages for C:\Temp\XamarinExample\App1\App1\App1.Android\App1.Android.csproj...
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: C:\Temp\XamarinExample\App1\App1\App1\obj\project.assets.json
Restore completed in 13.19 ms for C:\Temp\XamarinExample\App1\App1\App1\App1.csproj.
Committing restore...
Assets file has not changed. Skipping assets file writing. Path: C:\Temp\XamarinExample\App1\App1\App1.Android\obj\project.assets.json
Restore completed in 44.49 ms for C:\Temp\XamarinExample\App1\App1\App1.Android\App1.Android.csproj.
NuGet package restore finished.
------ Rebuild All started: Project: App1, Configuration: Debug Any CPU ------
Build started 20.03.2019 12:55:56.
Target CoreClean:
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\bin\Debug\netstandard2.0\App1.deps.json".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\bin\Debug\netstandard2.0\App1.dll".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\bin\Debug\netstandard2.0\App1.pdb".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.csprojAssemblyReference.cache".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App.xaml.g.cs".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\MainPage.xaml.g.cs".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.csproj.CoreCompileInputs.cache".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.AssemblyInfoInputs.cache".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.AssemblyInfo.cs".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\XamlC.stamp".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.dll".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1\obj\Debug\netstandard2.0\App1.pdb".
Target GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
Target XamlG:
Generating code behind for XAML files
Target CssG:
Skipping target "CssG" because it has no outputs.
Target CssG:
Skipping target "CssG" because it has no outputs.
Target CoreCompile:
Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Roslyn
Target XamlC:
Compiling Xaml, assembly: obj\Debug\netstandard2.0\App1.dll
Creating "obj\Debug\netstandard2.0\XamlC.stamp" because "AlwaysCreate" was specified.
Target CopyFilesToOutputDirectory:
Copying file from "obj\Debug\netstandard2.0\App1.dll" to "bin\Debug\netstandard2.0\App1.dll".
App1 -> C:\Temp\XamarinExample\App1\App1\App1\bin\Debug\netstandard2.0\App1.dll
Copying file from "obj\Debug\netstandard2.0\App1.pdb" to "bin\Debug\netstandard2.0\App1.pdb".

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.79
------ Rebuild All started: Project: App1.Android, Configuration: Debug Any CPU ------
Build started 20.03.2019 12:55:57.
CoreClean:
Deleting file "C:\Temp\XamarinExample\App1\App1\App1.Android\obj\Debug\81\MonoAndroid,Version=v8.1.AssemblyAttributes.cs".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1.Android\obj\Debug\81\App1.Android.nuget.stamp".
Deleting file "C:\Temp\XamarinExample\App1\App1\App1.Android\obj\Debug\81\App1.Android.csprojAssemblyReference.cache".
_CleanMsymArchive:
PackageName: com.companyname
_CleanMonoAndroidIntermediateDir:
Deleting file "obj\Debug\81\build.props".
_CleanIntermediateIfNuGetsChange:
Creating "obj\Debug\81\App1.Android.nuget.stamp" because "AlwaysCreate" was specified.
_ValidateAndroidPackageProperties:
PackageName: com.companyname
_ComputeAndroidResourcePaths:
Creating directory "obj\Debug\81\res\".
_ResolveMonoAndroidSdks:
MonoAndroid Tools: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\
Android Platform API level: 27
TargetFrameworkVersion: v8.1
Android NDK: \
Android SDK: C:\android-sdk\
Android SDK Build Tools: C:\android-sdk\build-tools\28.0.3\
Java SDK: C:\Program Files\Java\jdk1.8.0_202\
_GetPrimaryCpuAbi:
_PrimaryCpuAbi=
_CheckInstantRunCondition:
Dex Fast Deployment Enabled: False
_SetupInstantRun:
Android Java Class for Fast Deployment:
_SetupApplicationJavaClass:
Application Java class: android.app.Application
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: The "ResolveLibraryProjectImports" task failed unexpectedly.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: System.IO.IOException: The process cannot access the file 'C:\Temp\XamarinExample\App1\App1\App1.Android\obj\Debug\81\lp\10\jl\R.txt' because it is being used by another process.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.File.SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action2 progressCallback, Func2 modifyCallback, Func2 deleteCallback, Boolean forceUpdate) C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

Build FAILED.

"C:\Temp\XamarinExample\App1\App1\App1.Android\App1.Android.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
(_ResolveLibraryProjectImports target) ->
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: The "ResolveLibraryProjectImports" task failed unexpectedly.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: System.IO.IOException: The process cannot access the file 'C:\Temp\XamarinExample\App1\App1\App1.Android\obj\Debug\81\lp\10\jl\R.txt' because it is being used by another process.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at System.IO.File.SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tools.Files.ExtractAll(ZipArchive zip, String destination, Action2 progressCallback, Func2 modifyCallback, Func2 deleteCallback, Boolean forceUpdate) C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Extract(DirectoryAssemblyResolver res, ICollection1 jars, ICollection1 resolvedResourceDirectories, ICollection1 resolvedAssetDirectories, ICollection`1 resolvedEnvironments)
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Xamarin.Android.Tasks.ResolveLibraryProjectImports.Execute()
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1327,2): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.02
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>