Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild task fail to copy Fody on TFS agent build #1429

Closed
egimbernat opened this issue Jun 2, 2017 · 9 comments

Comments

Projects
None yet
7 participants
@egimbernat
Copy link

commented Jun 2, 2017

I'm traying to build the app every time I make a Check In to source control.
The build breaks when Realm Task tries to copy the Fody dll to Tools directory.

Goals

Make continous integration of a Xamarin App

Expected Results

Build completes sucessfully

Actual Results

Fail with this log line:

CopyRealmWeaver:
  CopyRealmWeaver
  Creating directory "*Undefined*Tools".
1-Development\packages\Realm.Database.1.4.0\build\Realm.Database.targets(28,5): Error MSB3021: Unable to copy file "d:\a\3\s\1-Development\packages\Realm.Database.1.4.0\build\..\tools\RealmWeaver.Fody.dll" to "*Undefined*Tools\RealmWeaver.Fody.dll". Illegal characters in path.

Steps to Reproduce

Create build definition within VisualStudio Online or TFS and try to build

Code Sample

There is no especific code since the problem ocurrs on nuget MSBUILD file.

@nirinchev

This comment has been minimized.

Copy link
Member

commented Jun 4, 2017

You need to provide /p:SolutionDir=/path/to/solution/folder. Here's a blog post on building with VSTS that will probably be helpful.

@nirinchev

This comment has been minimized.

Copy link
Member

commented Jun 4, 2017

I'll leave the issue open as a reminder to document that in the Q&A section of the docs.

@bmunkholm bmunkholm added S:Backlog and removed S:P1 Backlog labels Jul 10, 2017

@bmunkholm bmunkholm removed the S:Backlog label Aug 21, 2017

@nirinchev nirinchev added this to the 2017-38 milestone Aug 28, 2017

@nirinchev nirinchev self-assigned this Aug 28, 2017

@pixelchef pixelchef closed this Aug 28, 2017

@nirinchev nirinchev modified the milestones: 2017-36, 2017-38 Aug 28, 2017

@minaairsupport

This comment has been minimized.

Copy link

commented Oct 30, 2018

we still face the same issue and this blog answer not working

@nirinchev

This comment has been minimized.

Copy link
Member

commented Oct 30, 2018

Then it's unlikely to be the same issue. Please open a new one and provide information about your specific use case.

@minaairsupport

This comment has been minimized.

Copy link

commented Oct 30, 2018

C:\Users\VssAdministrator.nuget\packages\realm.database\3.1.0\build\Realm.Database.targets(28,5): Error MSB3021: Unable to copy file "C:\Users\VssAdministrator.nuget\packages\realm.database\3.1.0\build..\tools\RealmWeaver.Fody.dll" to "UndefinedTools\RealmWeaver.Fody.dll". Illegal characters in path.

Process 'msbuild.exe' exited with code '1'.
that is the error showing up , I think its the same one

@ahdata

This comment has been minimized.

Copy link

commented Oct 30, 2018

I found that adding a property group to your csproj files worked for my web app. You will also need to add it to your test projects too.

<PropertyGroup>
	<SolutionDir>..\</SolutionDir>
</PropertyGroup>

Fody/Fody#346 (comment)

@bondarenkod

This comment has been minimized.

Copy link

commented Dec 18, 2018

Neither

"/p:SolutionDir=Tools/" or "/p:SolutionDir=src/Tools/" on Additional Arguments

or

PropertyGroup + SolutionDir

does't work on solutions with deep structure, e.g. with submodules.

@minaairsupport

This comment has been minimized.

Copy link

commented Dec 19, 2018

yea you need to specify where exactly tools folder exist in your project (most properly will be in the root ) and add this path in Additional arguments
here is screenshot
ScreenShot

@Basti82b

This comment has been minimized.

Copy link

commented Jun 13, 2019

In the yml file on Azure DevOps this work for me:

  • task: XamariniOS@2
    inputs:
    solutionFile: '**/*iOS.csproj'
    args: '/p:SolutionDir=../'
    configuration: 'Release'
    buildForSimulator: true
    packageApp: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.