Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jeroen Janssen
    @japj
    Hello, has this gitter room been used before at all? I don’t see any discussion history
    Jonathon Marolf
    @jmarolf
    This was created somewhat recently and I do not think we've had any community discussions here. Have any questions?
    Jeroen Janssen
    @japj
    I am looking into dotnet/project-system#4101 and based on some of the documentation and debugging found my way to https://github.com/dotnet/project-system/blob/dev15.8.x/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Tree/Dependencies/Subscriptions/PackageRuleHandler.cs , which is where a DependencyType Assembly gets created for the DLL inside a NuGet Package.
    If I understand correctly the properties in PackageAssemblyDependencyModel is what (mostly) drives the content of the Properties Window in Visual Studio
    what I have trouble tracking down is where these properties are actually filled up in the calling stack. I seems at some point this is coming from async notifications, so I am wondering if that is actually happening inside the project-system sourcecode or not
    Jonathon Marolf
    @jmarolf
    I think @tmeschter answered your original question on dotnet/project-system#4101 but let me know if you have any other questions
    Brandon Ording
    @bording
    @jmarolf Any chance of getting an update on my PR? dotnet/project-system#3787
    Jonathon Marolf
    @jmarolf
    I'll ping Bill
    Brandon Ording
    @bording
    Thanks!
    Jonathon Marolf
    @jmarolf
    I've pinged the reviewers publicly and provately but some of them are not yet awake due to time zone differences
    Glenn
    @glennawatson

    hi, not sure if this is the correct place to chat

    So I am fixing my project to compile for both VS 4 Mac/VS 4 Windows

    At the moment got most projects compiling with

        <TargetFrameworks>netstandard2.0;net461;uap10.0.16299;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid81;netcoreapp2.0;tizen40</TargetFrameworks>
        <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid81;netcoreapp2.0;tizen40</TargetFrameworks>

    So for non windows I exclude net461/uap (using MsBuild.Sdk.Extras btw hence the extra TargetFrameworks.

    My question is how can I exclude a project from compiling altogether for a non-windows build. Eg I got a uap/net461 only project. Can I do the condition on the project level? I know I could take the approach of a separate .sln file but that's a last resort for me

    also another question I have is I am a bit confused by the relationship of the .net SDK and msbuild

    Eg to get LicenseExpression tag working I need to have installed .net core 2.1 onwards, even though my project is targetting netcoreapp2.0

    Does the .net sdk provide some sort of templates for msbuild?

    ProjectLicenseExpression rather (or whatever the new nuget csproj tags are)
    Glenn
    @glennawatson
    might ask on home
    jp2masa
    @jp2masa
    that's because NuGet ships with the .NET SDK, including the build targets
    jp2masa
    @jp2masa

    to disable compilation, you can try something like conditionally importing a targets file (in Directory.Build.targets), for example DisableTargets.targets, and then overriding default build targets, something like this:
    Directory.Build.targets:

    ...
      <Import Project="DisableTargets.targets" Condition="'$(DisableTargets)' == 'true'" />
    ...

    DisableTargets.targets:

    <Project>
      <Target Name="Build" />
    </Project>
    Glenn
    @glennawatson
    Hmm cool thanks
    That sounds like a good solution
    Glenn
    @glennawatson
    I think that solution simplifies having to declare the Target framework twice also
    jp2masa
    @jp2masa
    for the target frameworks you could do this as well:
        <TargetFrameworks>netstandard2.0;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;MonoAndroid81;netcoreapp2.0;tizen40</TargetFrameworks>
        <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net461;uap10.0.16299</TargetFrameworks>
    Glenn
    @glennawatson
    Thanks

    I am considering doing like

    <Import Project="DisableTargets.targets" Condition="'$(TargetFramework.StartsWith('net4')) and '$(OS)' != 'Windows_NT'" />

    In my Directory.Build.Targets

    not sure if I have access to the TargetFramework at that time though
    regardless I have enough information to get a clean solution now
    Jonathon Marolf
    @jmarolf
    @glennawatson is there a reason you can't just target only netstandard2.0?
    Glenn
    @glennawatson
    WPF/UWP projects
    this is a cross platform MVVM project, which targets UWP/WPF/Xamarin
    and the solution above worked
    so now able to keep my TargetFrameworks the original way and just use the disable target
    Jonathon Marolf
    @jmarolf
    with UI code I assume?
    Glenn
    @glennawatson

    some

    We use the target frameworks to include different directories in our platform folder

      <ItemGroup>
        <Compile Remove="Platforms\**\*.cs" />
        <None Include="Platforms\**\*.cs" />
     </ItemGroup>
    
     <ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
        <Compile Include="Platforms\netstandard2.0\**\*.cs" />
      </ItemGroup>
      <ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) ">
        <Compile Include="Platforms\net461\**\*.cs" />
      </ItemGroup>

    So it gets isolated off

    with .net core 3 we are going to have to use nuget transitive feature, since at the moment we have to include both UseWPF/UseUWP etc https://github.com/NuGet/Home/wiki/Allow-package--authors-to-define-build-assets-transitive-behavior
    that's the advice we been given by the guy working on the .net core 3 stuff
    Paul M Cohen
    @paul1956
    Is this the correct library to build a VBProj file outside of visual studio? I want to create a project file from scratch to compile a set of VB files into a dll. If so are there any example of doing so, if not does anything exist. I use MsBuild Workspace to read one, I want to transform what I get into something else.
    Using Workspace As MSBuildWorkspace = MSBuildWorkspace.Create()
        Dim currentProject As Project = Workspace.OpenProjectAsync(FileName).Result
        Workspace.LoadMetadataForReferencedProjects = True
         If currentProject.HasDocuments Then
             For Each document As Document In currentProject.Documents