Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:54

    rainersigwald on vsix-depend-on-nuget

    VSIX dependency on NuGet.BuildT… Disambiguate branch name (compare)

  • Jan 31 2019 22:45
    livarcocc review_requested #4121
  • Jan 31 2019 22:45
    livarcocc review_requested #4121
  • Jan 31 2019 22:45
    livarcocc opened #4121
  • Jan 31 2019 22:42
    daryllabar commented #545
  • Jan 31 2019 21:40
    JL2210 edited #4116
  • Jan 31 2019 21:40
    JL2210 edited #4116
  • Jan 31 2019 21:39
    JL2210 commented #4116
  • Jan 31 2019 21:05
    livarcocc milestoned #4116
  • Jan 31 2019 21:05
    livarcocc commented #4116
  • Jan 31 2019 20:55
    rainersigwald milestoned #4120
  • Jan 31 2019 20:55
    rainersigwald demilestoned #4120
  • Jan 31 2019 20:53
    livarcocc synchronize #4115
  • Jan 31 2019 20:53

    livarcocc on vs16.0

    Bump version to disambiguate wi… Merge pull request #4119 from r… (compare)

  • Jan 31 2019 20:53
    livarcocc closed #4119
  • Jan 31 2019 20:50

    livarcocc on livarcocc-patch-1

    (compare)

  • Jan 31 2019 20:50

    livarcocc on vs16.0

    Adding a vs16.0 trigger Updating to a more general trig… Merge pull request #4118 from M… (compare)

  • Jan 31 2019 20:50
    livarcocc synchronize #4115
  • Jan 31 2019 20:50
    livarcocc closed #4118
  • Jan 31 2019 20:46
    livarcocc milestoned #4120
Bill Hertzing
@BillHertzing
@Rabadash8820 I believe that MSBuild accesses static methods from .Net classes using the same syntax as Powershell. I felt it might be true for enumerations from .Net classes as well. Doing some experimentation in PowerShell, I found that, from a PowerShell prompt, that entering[System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::UserProfile) would display my UserProfile. You might try that syntax for your issue. plus-in-net-class-names has a little bit more detail.
Jerry Wiltse
@solvingj
When writing a custom task in MSBuild, is there any way to access "current configuration" when the task is executed (Win32|Debug for example). I honestly can't seem to find a way to do it without having to add Configuration and Platform parameters to my build task, and there's no way that's required right? I'm crawling every namespace here and I feel like it must be there but I can't find it: https://docs.microsoft.com/en-us/dotnet/api/?view=msbuild-16-netcore
Dan Vicarel
@Rabadash8820
@BillHertzing thanks for the reply! That pointed in me in the right direction. MSBuild seems to be using some weird "almost PowerShell" syntax. In the end, this expression worked in my MSBuild property: $([System.Environment]::GetFolderPath('System.Environment+SpecialFolder.UserProfile')) (note the simplified enum member name with single quotes around it)
Dylan Borg
@borgdylan
@radical Is the monof ork of msbuild still worked on? Or is there a migration path to use the .NET SDK version for desktop frameework or mono projects also?
Jose
@pepone
Hey I creating some items in a target with an ItemGroup
<ItemGroup>
            <ClCompile Include="@(_SliceCompile->'%(OutputDir)\%(Filename).%(SourceExt)')"
                       Exclude="@(ClCompile->'%(FullPath)');@(ClCompile->'%(Identity)')" />
        </ItemGroup>
But I would expect the new ClCompile to no inherit any metadata from the _SliceCompile item, but I seeing it is copying the AdditionalOptions,
Jose
@pepone
is there some metadata inheritance for the items generated inside a target?
Jose
@pepone
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="SliceCompile" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
    <SliceCompile>
        <AdditionalOptions>--add-header foo.h</AdditionalOptions>
    </SliceCompile>
</ItemDefinitionGroup>
<ItemGroup>
    <SliceCompile Include="Foo.ice">
        <AdditionalOptions>%(AdditionalOptions) --other</AdditionalOptions>
    </SliceCompile>
</ItemGroup>
<Target Name="SliceCompile">
    <ItemGroup>
        <ClCompile Include="@(SliceCompile->'%(Filename).cpp')">
        </ClCompile>
    </ItemGroup>
    <Warning Text="@(ClCompile->'%(ClCompile.Identity) %(ClCompile.AdditionalOptions)'"/>
</Target>
</Project>
Here the ClCompile generated item has all the metadata from SliceCompile, any pointers as to why this happens
Chris McGrath
@clmcgrath

not sure where to put this

having an odd issue with msbuild vscode and visual studio all failing and not able to find critical pieces of .netcore 3.1 / .net 5
i have reinstalled 4x and also tried manually installing from the binary package all of which are failing , it started with not finding the sdk at all , the binary package manual install semms to have fixed that issue but now i am recieving errors about not being able to find the netcoreapp targeting pack , this is happening in all products and the cli as well

Christian Seidlitz
@SeidChr

hi there

anyone has an idea how i could exclude a referenced analyzer package in a normal "dotnet build" command, but include it in the roslyn compiler stuff whick is used to generate the warnings and hints in vscode (probably called by omnisharp)
is there any environment variable i can check which is set during a normal build and not set on the others?

Bill Hertzing
@BillHertzing
@SeidChr I believe you are referring to the difference between "normal" builds and "Design-time builds". Here's a link to more information about Design-time builds under Visual Studio. I also spent a few minutes seeing if the same would work under Visual Studio Code (Omnisharp), however, I was not successful, mainly because I couldn't find any Omnisharp logs that would hopefully show every time Omnisharp kicks off any Design-time builds. For what its worth, I hope this helps you. Would love to know if you get it figured out for VSC.
plsHelpMe-vs
@plsHelpMe-vs
How am I gonna solve the CopyRefAssembly task failed unexpectedly?
Igor Velikorossov
@RussKie
Use binlogs and https://msbuildlog.com/
Dylan Borg
@borgdylan
@radical Is MSBuild 16.8 and 16.9 planned for Mono?
Francesco Pretto
@ceztko
Hello, is it possible to configure binlog when compiling projects using MSBuildWorkSpace?
Francesco Pretto
@ceztko
MSBuild maintainers advised me to do so in this issue, but there's no example of how to do it, nor the MSBuildWorkSpace seems to be expressive enough to allow to do it trivially, so I'm out of ideas
Tebjan Halm
@tebjan
is it possible to bundle MSBuild with an application? So the end-user doesn't need to install it. basically setup a local MSBuild environment next to the exe and use that instead of relying on it to be installed on the system.
the reason is, almost every MSBuild update breaks our app and install process, which is an absolute pain for the end-user and us as developers.
Keith Rosenberg
@netpoetica

Has anybody encountered this error before?

Project "C:\build\plugins-example\build\ALL_BUILD.vcxproj" on node 1 (default targets).
C:\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.Cpp.props(31,5): error MSB4186: Invalid static method inv
ocation syntax: "[Microsoft.Build.Utilities.ToolLocationHelper]::FindRootFolderWhereAllFilesExist($(_VCTarg
etsPathFolders), $(_RelativeToolsetFiles))". Method 'Microsoft.Build.Utilities.ToolLocationHelper.FindRootF
olderWhereAllFilesExist' not found. Static method invocation should be of the form: $([FullTypeName]::Metho
d()), e.g. $([System.IO.Path]::Combine(`a`, `b`)).  [C:\build\plugins-example\build\ALL_BUILD.vcxproj]
Done Building Project "C:\build\plugins-example\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.

I am generating these projects with CMake using vcpkg toolchain:

cmake -G "Visual Studio 16 2019" -A x64 ../ -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE

I have been struggling for a while to find any illuminating ideas as to what it means on the web :) hoping it is something simpler than I think

Jacob Hodges
@jachin84
I am trying to understand the relationship between VSTest target and the vstest.console.exe
It looks like VSTest eventually calls vstest.console.exe.
But does so once per test assembly rather than passing in all tests in one go.
Adam Granicz
@granicz
Hi all - newbie question, sorry if it has been asked before: is there an msbuild command that I can run in a folder with a project file that gives me the full list of resolved assemblies (free of package/project references)?
Oleksii Kavka
@Varveyn
Hello everyone. As far as I see, it is supported to specify the Version for the PackageReference as a child tag rather than an attribute. But there's no IntelliSense support for this in Visual Studio (2019) and the documentation does not mention that the version can be specified like this. Is such syntax discouraged?
<PackageReference Include="Castle.Windsor">
  <Version>5.1.1</Version>
</PackageReference>
Bert Huijben
@rhuijben
@Varveyn MSBuild's syntax parser usually allows both syntaxes, but xml intellisense has no easy way to declare both at once...
Gregory Pakosz
@gpakosz

Hello. We have a .sln that contains like 50 .vcxproj. These mainly build C libraries or tools. Today I would like to add a project which purpose is to generate a GIT_COMMIT.h header file. I don't want this to be a custom build step per project. I believe this could be a project other projects depend on. It seems I have 2 choices:

  • use what seems to be a deprecated project type: the utility project type
  • use a shared items project

With a shared items project, how would you achieve that one of the shared items (the GIT_COMMIT.h header mentioned above) should be generated at build time?

Luis Jesus
@LJ_Rios_twitter
Hello, how can I resolv this: on node 1 (Publish target(s)). _DeploymentUnpublishable: Skipping unpublishable project.
1 reply
Bill Hertzing
@BillHertzing

@LJ_Rios_twitter add the -bl switch , as -bl[:Filename=<DesiredPathToBuildLogs>/<binlofilename.binlog>]. The filename/path is optional. If used, the filename/path should specify a filename that uses a .binlog suffix/extension

Download the MSBuild Structured Log Viewer from MSBuildStructuredLog and install it.

Look at these two sites for information on using the log file and viewer NSBuildLog and especially Debugging MSBuild

Luis Jesus
@LJ_Rios_twitter
Thanks!!
Dylan Borg
@borgdylan
@radical Will v16.11 be available in the mono branch or has the time of one repository fits all arrived?
Hugh Gleaves
@Korporal
Hi, I have a question
We added this file to the root of a repo: Directory.Build.props
<Project>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<GitRepositoryRemoteName>principal</GitRepositoryRemoteName>
</PropertyGroup>

<Target Name="ConvertCommitIdToUpperCase" AfterTargets="InitializeSourceControlInformationFromSourceControlManager">
<PropertyGroup>
<SourceRevisionId>$(SourceRevisionId.ToUpperInvariant().Substring(0,16).PadLeft(17))</SourceRevisionId>
</PropertyGroup>
</Target>


</Project>
It seems to be fine for all SDK style projects and seems to do what's desired (enables SourceLink for all projects we build without needing to add it to the projects themselves)
However its presence at the repo root negatively impacts non-SDK projects in that the VS 2019 nuget packet manager misbehaves, totally can't see available updates or already installed packages.
Is there anything we can add to the file that makes it apply only to SDK style projects so that it is ignored or has no effect when a non-SDK project is built?
Hugh Gleaves
@Korporal
is it possible to add some kind of "condition" for example to the <Project> node?
Hugh Gleaves
@Korporal
Hmm I can get the TargetFramework, and if that does not contain a period then we know its old, not .Net Standard or .Net Core
Hugh Gleaves
@Korporal
Nah, nothing works, the presence of a Directory.Build.props seems to cause problems for nuget package manager in "legacy" projects, even making stuff totally conditional has no effect.
Hugh Gleaves
@Korporal
OK this is my issue:
Michael W Powell
@mwpowellhtx

In the csproj, there is support for AssemblyAttribute item, i.e.

<ItemGroup>
    <AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
        <_Parameter1>Test.$(MSBuildProjectName)</_Parameter1>
    </AssemblyAttribute>
</ItemGroup>

Which that apparently has a dotnet/sdk#3439 migratoin path.
Anyway, my question is not really about InternalsVisibleTo but rather AssemblyAttribute.
Where is there documentation for this, please. Specifically dealing with _Parameter1 attributes.
More specifically how do we relay properties on the instance itself?
i.e. let's say there was a public string Version { get; set; } we wanted to set via csproj. Is it possible?
Thanks...

Michael W Powell
@mwpowellhtx
Is this group still alive?
Q: if we have some items with properties, one of those properties is a selector, a key, that we can filter on. is it possible to conditionally batch some of them to do one thing, and batch others of them to do another thing, i.e. within a <Target/>?
3 replies
Michael W Powell
@mwpowellhtx
Probably been asked before, which is the MSBuild step in which AssemblyInfo.cs <AssemblyAttribute/> instances are rolled up and generated? thank you...
Michael W Powell
@mwpowellhtx
Anyone at all have any ideas, is it possible? Thanks... https://github.com/dotnet/msbuild/discussions/7524
Michael W Powell
@mwpowellhtx
Re: AssemblyInfo question, thank you... https://github.com/dotnet/msbuild/discussions/7530
Jerome Haltom
@wasabii
Is there a trick to getting VS intellisense to pick up type information added post CoreCompile in a dependency ProjectReference?
Used to be it would directly read from the intermediate assembly. But, reading about how it's changed since Roslyn, it seems like the language service now does much of it itself? Is there a trick to bypassing this?