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]::MakeRelative()) returns different values on 16.10 than older version #6493

Closed
yodovicz opened this issue May 27, 2021 · 11 comments

Comments

@yodovicz
Copy link

yodovicz commented May 27, 2021

Issue Description

Newest version of VisualStudio (MSBuild 16.10) return different values on msbuild property function MakeRelative() with paths ending backslash.

Steps to Reproduce

code: $([MSBuild]::MakeRelative('c:\windows\', 'c:\windows\system32\'))
MSBuild 16.10 returns: 'system32'
MSBuild 16.9 and older returns: 'system32\'

Expected Behavior

according to https://docs.microsoft.com/en-us/dotnet/api/system.uri.makerelativeuri?view=net-5.0
it should returns 'system32\'

Actual Behavior

returns 'system32'

Analysis

MSBuild unittests does not contains paths ending backslash
https://github.com/dotnet/msbuild/blob/main/src/Shared/UnitTests/FileUtilities_Tests.cs#L86

Versions & Configurations

16.10.0.26302

@yodovicz yodovicz added bug needs-triage Have yet to determine what bucket this goes in. labels May 27, 2021
@pmisik
Copy link

pmisik commented May 27, 2021

Here is sample project to easily verify behavior has changed

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
  <Target Name="Build">
    <PropertyGroup>
	<_RelativeDir>$([MSBuild]::MakeRelative('c:\windows\', 'c:\windows\system32\'))</_RelativeDir>
    </PropertyGroup>
    <Message Text="MakeRelative('c:\windows\', 'c:\windows\system32\')): $(_RelativeDir)" />
    <Error Condition="!$(_RelativeDir.EndsWith('\'))" Text="_RelativeDir='$(_RelativeDir)' does not ends with backslash" />
  </Target>
</Project>

@BrunoJuchli
Copy link

BrunoJuchli commented May 27, 2021

This change causes execution of our application to fail. We're using System.Data.SQLite.Core which now fails to include the SQLite.Interop.dll as content.
When executing the application we get the following exception:

System.DllNotFoundException : Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
at System.Data.SQLite.SQLite3.StaticIsInitialized()
at System.Data.SQLite.SQLiteLog.Initialize(String className)
at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
at System.Data.SQLite.SQLiteConnection..ctor()

Also see https://sqlite.org/forum/forumpost/b691c7086468c80dafba99497df225b51994df5aaa934962415ba50e31a9796f

@dsparkplug
Copy link

The following line appears to be the cause of this issue:
https://github.com/dotnet/msbuild/pull/6311/files#diff-b62db5f7e7f90841af8ef58195eb4318cabc0742747ba3f2e97f10cfa21d6658R1081

@pmisik
Copy link

pmisik commented May 28, 2021

@marcinzi
Copy link

marcinzi commented Jun 1, 2021

We're hitting downstream build issues on SQLite.interop.dll as reported by Bruno
with no reasonable workaround other than downgrading build agent pool to self-hosted

@nzbart
Copy link

nzbart commented Jun 8, 2021

I know +1 comments are frowned upon, but at the same time they seem to be the only way to get things prioritised. We're experiencing the same problem with Sqlite. Therefore:

+1

@teh13th
Copy link

teh13th commented Jun 8, 2021

+1 to this problem.

@jeremy-morren
Copy link

We are also having the problem with System.Data.SQLite. This is a blocking issue, since no builds work.

@cmichaelingram
Copy link

Bit us too. Blocking as no builds work that use the SQLite nuget packages.

xen2 added a commit to stride3d/stride that referenced this issue Jun 8, 2021
@dsparkplug
Copy link

A pull request #6513 to fix this has now been merged into the vs16.10 branch and is listed in the servicing fixes for v16.10.2 #6537

xen2 added a commit to stride3d/stride that referenced this issue Jun 9, 2021
@ghost ghost mentioned this issue Jun 9, 2021
@rainersigwald rainersigwald removed the needs-triage Have yet to determine what bucket this goes in. label Jun 9, 2021
@rainersigwald rainersigwald added this to the MSBuild 16.10 milestone Jun 9, 2021
phr00t added a commit to phr00t/FocusEngine that referenced this issue Jun 9, 2021
@rainersigwald
Copy link
Member

16.10.2 is now released for Visual Studio customers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.