Hi, I've found that just adding a reference to a COM object causes the build to fail with this single error:
….nuget\packages\microsoft.aspnetcore.razor.design\2.1.2\build\netstandard2.0\Microsoft.AspNetCore.Razor.Design.CodeGeneration.targets(69,5): error : The assembly path obj\Debug\net461\win7-x86\Interop.MyComLib.dll is invalid. Assembly paths must be rooted.
As a quick work-around I disabled the error in RazorTagHelper.cs, rebuilt and replaced my current 2.1.2\tasks\netstandard2.0\Microsoft.AspNetCore.Razor.Tasks.dll
It’s unclear to me where the path of the referenced COM import library is stored let alone created. Maybe the “rooted assembly path” check should verify it’s not a COM object first?
// My work-around is:
protected override bool ValidateParameters()
{
...
for (var i = 0; i < Assemblies.Length; i++)
{
if (!Path.IsPathRooted(Assemblies[i]))
{
// my COM object doesn't seem to have a rooted path and this fails - so lets make it a warning instead
//Log.LogError("The assembly path {0} is invalid. Assembly paths must be rooted.", Assemblies[i]);
//return false;
Log.LogWarning("The assembly path {0} is invalid. Assembly paths must be rooted.", Assemblies[i]);
}
}
Hi, I've found that just adding a reference to a COM object causes the build to fail with this single error:
As a quick work-around I disabled the error in RazorTagHelper.cs, rebuilt and replaced my current 2.1.2\tasks\netstandard2.0\Microsoft.AspNetCore.Razor.Tasks.dll
It’s unclear to me where the path of the referenced COM import library is stored let alone created. Maybe the “rooted assembly path” check should verify it’s not a COM object first?