runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)

Open sadeqhatami opened this issue 9 years ago • 22 comments

hello i use VS 2017 version 15.1 (26403.3) Release and .Net framework version 4.6.01586 when i build my project build succeed and my project is lunch,but in Error List i see this error

Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)

my csproj is

<Project Sdk="Microsoft.NET.Sdk.Web">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>
    <PreserveCompilationContext>true</PreserveCompilationContext>
    <AssemblyName>AdminPanel</AssemblyName>
    <OutputType>Exe</OutputType>
    <PackageId>AdminPanel</PackageId>
    <RuntimeFrameworkVersion>1.1.1</RuntimeFrameworkVersion>
    <PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="bower_components\jquery-validation-unobtrusive\.bower.json" />
    <Content Include="bower_components\jquery-validation-unobtrusive\bower.json" />
    <Content Include="bower_components\jquery-validation-unobtrusive\LICENSE.txt" />
    <Content Include="bower_components\jquery-validation\.bower.json" />
    <Content Include="bower_components\jquery-validation\bower.json" />
    <Content Include="bower_components\jquery-validation\package.json" />
    <Content Include="bower_components\jquery-validation\validation.jquery.json" />
    <Content Include="bower_components\jquery\.bower.json" />
    <Content Include="bower_components\jquery\AUTHORS.txt" />
    <Content Include="bower_components\jquery\bower.json" />
    <Content Include="bower_components\jquery\external\sizzle\LICENSE.txt" />
    <Content Include="bower_components\jquery\LICENSE.txt" />
    <Content Include="bower_components\jquery\src\.eslintrc.json" />
  </ItemGroup>

  <ItemGroup>
    <None Include="bower_components\jquery-validation-unobtrusive\jquery.validate.unobtrusive.js" />
    <None Include="bower_components\jquery-validation-unobtrusive\jquery.validate.unobtrusive.min.js" />
    <None Include="bower_components\jquery-validation\build\release.js" />
    <None Include="bower_components\jquery-validation\changelog.md" />
    <None Include="bower_components\jquery-validation\CONTRIBUTING.md" />
    <None Include="bower_components\jquery-validation\dist\additional-methods.js" />
    <None Include="bower_components\jquery-validation\dist\additional-methods.min.js" />
    <None Include="bower_components\jquery-validation\dist\jquery.validate.js" />
    <None Include="bower_components\jquery-validation\dist\jquery.validate.min.js" />
    <None Include="bower_components\jquery-validation\Gruntfile.js" />
    <None Include="bower_components\jquery-validation\LICENSE.md" />
    <None Include="bower_components\jquery-validation\README.md" />
    <None Include="bower_components\jquery-validation\src\additional\accept.js" />
    <None Include="bower_components\jquery-validation\src\additional\additional.js" />
    <None Include="bower_components\jquery-validation\src\additional\alphanumeric.js" />
    <None Include="bower_components\jquery-validation\src\additional\bankaccountNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\bankorgiroaccountNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\bic.js" />
    <None Include="bower_components\jquery-validation\src\additional\cifES.js" />
    <None Include="bower_components\jquery-validation\src\additional\cpfBR.js" />
    <None Include="bower_components\jquery-validation\src\additional\creditcard.js" />
    <None Include="bower_components\jquery-validation\src\additional\creditcardtypes.js" />
    <None Include="bower_components\jquery-validation\src\additional\currency.js" />
    <None Include="bower_components\jquery-validation\src\additional\dateFA.js" />
    <None Include="bower_components\jquery-validation\src\additional\dateITA.js" />
    <None Include="bower_components\jquery-validation\src\additional\dateNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\extension.js" />
    <None Include="bower_components\jquery-validation\src\additional\giroaccountNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\iban.js" />
    <None Include="bower_components\jquery-validation\src\additional\integer.js" />
    <None Include="bower_components\jquery-validation\src\additional\ipv4.js" />
    <None Include="bower_components\jquery-validation\src\additional\ipv6.js" />
    <None Include="bower_components\jquery-validation\src\additional\lettersonly.js" />
    <None Include="bower_components\jquery-validation\src\additional\letterswithbasicpunc.js" />
    <None Include="bower_components\jquery-validation\src\additional\mobileNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\mobileUK.js" />
    <None Include="bower_components\jquery-validation\src\additional\nieES.js" />
    <None Include="bower_components\jquery-validation\src\additional\nifES.js" />
    <None Include="bower_components\jquery-validation\src\additional\notEqualTo.js" />
    <None Include="bower_components\jquery-validation\src\additional\nowhitespace.js" />
    <None Include="bower_components\jquery-validation\src\additional\pattern.js" />
    <None Include="bower_components\jquery-validation\src\additional\phoneNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\phonesUK.js" />
    <None Include="bower_components\jquery-validation\src\additional\phoneUK.js" />
    <None Include="bower_components\jquery-validation\src\additional\phoneUS.js" />
    <None Include="bower_components\jquery-validation\src\additional\postalcodeBR.js" />
    <None Include="bower_components\jquery-validation\src\additional\postalCodeCA.js" />
    <None Include="bower_components\jquery-validation\src\additional\postalcodeIT.js" />
    <None Include="bower_components\jquery-validation\src\additional\postalcodeNL.js" />
    <None Include="bower_components\jquery-validation\src\additional\postcodeUK.js" />
    <None Include="bower_components\jquery-validation\src\additional\require_from_group.js" />
    <None Include="bower_components\jquery-validation\src\additional\skip_or_fill_minimum.js" />
    <None Include="bower_components\jquery-validation\src\additional\statesUS.js" />
    <None Include="bower_components\jquery-validation\src\additional\strippedminlength.js" />
    <None Include="bower_components\jquery-validation\src\additional\time.js" />
    <None Include="bower_components\jquery-validation\src\additional\time12h.js" />
    <None Include="bower_components\jquery-validation\src\additional\url2.js" />
    <None Include="bower_components\jquery-validation\src\additional\vinUS.js" />
    <None Include="bower_components\jquery-validation\src\additional\zipcodeUS.js" />
    <None Include="bower_components\jquery-validation\src\additional\ziprange.js" />
    <None Include="bower_components\jquery-validation\src\ajax.js" />
    <None Include="bower_components\jquery-validation\src\core.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ar.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_az.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_bg.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_bn_BD.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ca.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_cs.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_da.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_de.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_el.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_es.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_es_AR.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_es_PE.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_et.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_eu.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_fa.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_fi.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_fr.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ge.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_gl.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_he.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_hr.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_hu.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_hy_AM.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_id.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_is.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_it.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ja.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ka.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_kk.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ko.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_lt.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_lv.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_mk.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_my.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_nl.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_no.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_pl.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_pt_BR.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_pt_PT.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ro.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ru.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_si.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_sk.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_sl.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_sr.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_sr_lat.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_sv.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_th.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_tj.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_tr.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_uk.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_ur.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_vi.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_zh.js" />
    <None Include="bower_components\jquery-validation\src\localization\messages_zh_TW.js" />
    <None Include="bower_components\jquery-validation\src\localization\methods_de.js" />
    <None Include="bower_components\jquery-validation\src\localization\methods_es_CL.js" />
    <None Include="bower_components\jquery-validation\src\localization\methods_fi.js" />
    <None Include="bower_components\jquery-validation\src\localization\methods_nl.js" />
    <None Include="bower_components\jquery-validation\src\localization\methods_pt.js" />
    <None Include="bower_components\jquery\dist\core.js" />
    <None Include="bower_components\jquery\dist\jquery.js" />
    <None Include="bower_components\jquery\dist\jquery.min.js" />
    <None Include="bower_components\jquery\dist\jquery.min.map" />
    <None Include="bower_components\jquery\dist\jquery.slim.js" />
    <None Include="bower_components\jquery\dist\jquery.slim.min.js" />
    <None Include="bower_components\jquery\dist\jquery.slim.min.map" />
    <None Include="bower_components\jquery\external\sizzle\dist\sizzle.js" />
    <None Include="bower_components\jquery\external\sizzle\dist\sizzle.min.js" />
    <None Include="bower_components\jquery\external\sizzle\dist\sizzle.min.map" />
    <None Include="bower_components\jquery\README.md" />
    <None Include="bower_components\jquery\src\ajax.js" />
    <None Include="bower_components\jquery\src\ajax\jsonp.js" />
    <None Include="bower_components\jquery\src\ajax\load.js" />
    <None Include="bower_components\jquery\src\ajax\parseXML.js" />
    <None Include="bower_components\jquery\src\ajax\script.js" />
    <None Include="bower_components\jquery\src\ajax\var\location.js" />
    <None Include="bower_components\jquery\src\ajax\var\nonce.js" />
    <None Include="bower_components\jquery\src\ajax\var\rquery.js" />
    <None Include="bower_components\jquery\src\ajax\xhr.js" />
    <None Include="bower_components\jquery\src\attributes.js" />
    <None Include="bower_components\jquery\src\attributes\attr.js" />
    <None Include="bower_components\jquery\src\attributes\classes.js" />
    <None Include="bower_components\jquery\src\attributes\prop.js" />
    <None Include="bower_components\jquery\src\attributes\support.js" />
    <None Include="bower_components\jquery\src\attributes\val.js" />
    <None Include="bower_components\jquery\src\callbacks.js" />
    <None Include="bower_components\jquery\src\core.js" />
    <None Include="bower_components\jquery\src\core\access.js" />
    <None Include="bower_components\jquery\src\core\DOMEval.js" />
    <None Include="bower_components\jquery\src\core\init.js" />
    <None Include="bower_components\jquery\src\core\nodeName.js" />
    <None Include="bower_components\jquery\src\core\parseHTML.js" />
    <None Include="bower_components\jquery\src\core\ready-no-deferred.js" />
    <None Include="bower_components\jquery\src\core\ready.js" />
    <None Include="bower_components\jquery\src\core\readyException.js" />
    <None Include="bower_components\jquery\src\core\stripAndCollapse.js" />
    <None Include="bower_components\jquery\src\core\support.js" />
    <None Include="bower_components\jquery\src\core\var\rsingleTag.js" />
    <None Include="bower_components\jquery\src\css.js" />
    <None Include="bower_components\jquery\src\css\addGetHookIf.js" />
    <None Include="bower_components\jquery\src\css\adjustCSS.js" />
    <None Include="bower_components\jquery\src\css\curCSS.js" />
    <None Include="bower_components\jquery\src\css\hiddenVisibleSelectors.js" />
    <None Include="bower_components\jquery\src\css\showHide.js" />
    <None Include="bower_components\jquery\src\css\support.js" />
    <None Include="bower_components\jquery\src\css\var\cssExpand.js" />
    <None Include="bower_components\jquery\src\css\var\getStyles.js" />
    <None Include="bower_components\jquery\src\css\var\isHiddenWithinTree.js" />
    <None Include="bower_components\jquery\src\css\var\rmargin.js" />
    <None Include="bower_components\jquery\src\css\var\rnumnonpx.js" />
    <None Include="bower_components\jquery\src\css\var\swap.js" />
    <None Include="bower_components\jquery\src\data.js" />
    <None Include="bower_components\jquery\src\data\Data.js" />
    <None Include="bower_components\jquery\src\data\var\acceptData.js" />
    <None Include="bower_components\jquery\src\data\var\dataPriv.js" />
    <None Include="bower_components\jquery\src\data\var\dataUser.js" />
    <None Include="bower_components\jquery\src\deferred.js" />
    <None Include="bower_components\jquery\src\deferred\exceptionHook.js" />
    <None Include="bower_components\jquery\src\deprecated.js" />
    <None Include="bower_components\jquery\src\dimensions.js" />
    <None Include="bower_components\jquery\src\effects.js" />
    <None Include="bower_components\jquery\src\effects\animatedSelector.js" />
    <None Include="bower_components\jquery\src\effects\Tween.js" />
    <None Include="bower_components\jquery\src\event.js" />
    <None Include="bower_components\jquery\src\event\ajax.js" />
    <None Include="bower_components\jquery\src\event\alias.js" />
    <None Include="bower_components\jquery\src\event\focusin.js" />
    <None Include="bower_components\jquery\src\event\support.js" />
    <None Include="bower_components\jquery\src\event\trigger.js" />
    <None Include="bower_components\jquery\src\exports\amd.js" />
    <None Include="bower_components\jquery\src\exports\global.js" />
    <None Include="bower_components\jquery\src\jquery.js" />
    <None Include="bower_components\jquery\src\manipulation.js" />
    <None Include="bower_components\jquery\src\manipulation\buildFragment.js" />
    <None Include="bower_components\jquery\src\manipulation\getAll.js" />
    <None Include="bower_components\jquery\src\manipulation\setGlobalEval.js" />
    <None Include="bower_components\jquery\src\manipulation\support.js" />
    <None Include="bower_components\jquery\src\manipulation\var\rcheckableType.js" />
    <None Include="bower_components\jquery\src\manipulation\var\rscriptType.js" />
    <None Include="bower_components\jquery\src\manipulation\var\rtagName.js" />
    <None Include="bower_components\jquery\src\manipulation\wrapMap.js" />
    <None Include="bower_components\jquery\src\manipulation\_evalUrl.js" />
    <None Include="bower_components\jquery\src\offset.js" />
    <None Include="bower_components\jquery\src\queue.js" />
    <None Include="bower_components\jquery\src\queue\delay.js" />
    <None Include="bower_components\jquery\src\selector-native.js" />
    <None Include="bower_components\jquery\src\selector-sizzle.js" />
    <None Include="bower_components\jquery\src\selector.js" />
    <None Include="bower_components\jquery\src\serialize.js" />
    <None Include="bower_components\jquery\src\traversing.js" />
    <None Include="bower_components\jquery\src\traversing\findFilter.js" />
    <None Include="bower_components\jquery\src\traversing\var\dir.js" />
    <None Include="bower_components\jquery\src\traversing\var\rneedsContext.js" />
    <None Include="bower_components\jquery\src\traversing\var\siblings.js" />
    <None Include="bower_components\jquery\src\var\arr.js" />
    <None Include="bower_components\jquery\src\var\class2type.js" />
    <None Include="bower_components\jquery\src\var\concat.js" />
    <None Include="bower_components\jquery\src\var\document.js" />
    <None Include="bower_components\jquery\src\var\documentElement.js" />
    <None Include="bower_components\jquery\src\var\fnToString.js" />
    <None Include="bower_components\jquery\src\var\getProto.js" />
    <None Include="bower_components\jquery\src\var\hasOwn.js" />
    <None Include="bower_components\jquery\src\var\indexOf.js" />
    <None Include="bower_components\jquery\src\var\ObjectFunctionString.js" />
    <None Include="bower_components\jquery\src\var\pnum.js" />
    <None Include="bower_components\jquery\src\var\push.js" />
    <None Include="bower_components\jquery\src\var\rcssNum.js" />
    <None Include="bower_components\jquery\src\var\rnothtmlwhite.js" />
    <None Include="bower_components\jquery\src\var\slice.js" />
    <None Include="bower_components\jquery\src\var\support.js" />
    <None Include="bower_components\jquery\src\var\toString.js" />
    <None Include="bower_components\jquery\src\wrap.js" />
  </ItemGroup>

  <ItemGroup>
    <None Update="wwwroot\**\*">
      <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </None>
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\..\..\Common - 2017\CallWebApi\CallWebApi.csproj" />
    <ProjectReference Include="..\..\..\Common - 2017\Lib\Lib.csproj" />
    <ProjectReference Include="..\AdminDataLayer\AdminDataLayer.csproj" />
    <ProjectReference Include="..\ViewModels\ViewModels.csproj" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Session" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.1" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer.Design" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
    <PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" />
    <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="1.1.0" />
    <PackageReference Include="StackifyMiddleware" Version="2.0.3" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="1.1.1" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.1" />
    <PackageReference Include="AutoMapper" Version="6.0.2" />
    <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="2.0.1" />
    <PackageReference Include="System.Linq.Dynamic.Core" Version="1.0.6.13" />
  </ItemGroup>

</Project>

how i can fix this problem?

sadeqhatami avatar Apr 16 '17 11:04 sadeqhatami

This seems to be a similar issue to dotnet/runtime#17745

Possible fix: https://github.com/dotnet/corefx/issues/9788#issuecomment-288678333

BattleRush avatar Apr 16 '17 15:04 BattleRush

@BattleRush thank's for answer,i was see this issue and do it but my problem not fix :(

sadeqhatami avatar Apr 16 '17 15:04 sadeqhatami

@ericstj @weshaggard is it potentially a bug in our/MS packaging?

karelz avatar Apr 17 '17 15:04 karelz

Microsoft.Composition has never supported netcoreapp and that package is not produced out of corefx.

You can exclude Microsoft.Composition and reference System.Composition:

<PackageReference Include="Microsoft.Composition" Version="1.0.27" ExcludeAssets="All" />
<PackageReference Include="System.Composition" Version="1.0.31" />

ericstj avatar Apr 17 '17 16:04 ericstj

I was having the same issue and managed to solve it by removing the offending package. By mistake I have added scaffolding support to one of my mvc projects. This added a reference to Microsoft.VisualStudio.Web.CodeGeneration.Design, which if you follow to nuget references all the way down to Microsoft.CodeAnalysis.Workspaces.Common, will reference Microsoft.Composition. So, in my case, removing the Microsoft.VisualStudio.Web.CodeGeneration.Design package reference, solved the issue.

pnobre avatar Apr 18 '17 18:04 pnobre

pnobre pointed out where I was seeing this as well. My MVC project had a PackageTargetFallback entry in it, but the error actually showed up when referencing that project from my testing project. Adding the same entry to the test project cleared up the error.

seanterry42 avatar Apr 18 '17 18:04 seanterry42

Closing this as there are several workarounds. I recommend you follow up with the owner of the package that had this dependency Microsoft.CodeAnalysis.Workspaces.Common and ask them to update their package so you don't need to use workarounds.

ericstj avatar Apr 18 '17 19:04 ericstj

ericstj, just for posterity, it is added to ASP.NET Core projects automatically when taking the following actions:

  • Create a project with the "ASP.NET Core Web Application (.NET Core)" project type.
  • Use the "Empty" template.
  • Add "New Scaffolded Item"
  • Select "Minimal Dependencies". When scaffolding completes, Microsoft.VisualStudio.Web.CodeGeneration.Design is automatically added as a package, which also includes Microsoft.CodeAnalysis.Workspaces.Common.

seanterry42 avatar Apr 19 '17 17:04 seanterry42

@ericstj : Unable to get rid of "Microsoft.Composition": "1.0.27", as it is no where referenced in project explicitly, @seanterry42 , this is true. Even after removing Microsoft.VisualStudio.Web.CodeGeneration.Design from .csproj I am getting this issue. I can see *.deps.json, *.assets.json have references of this.

avikenjale avatar May 26 '17 15:05 avikenjale

You don't need to have a direct reference to remove it. The app can use the workaround I mentioned above:

<PackageReference Include="Microsoft.Composition" Version="1.0.27" ExcludeAssets="All" />
<PackageReference Include="System.Composition" Version="1.0.31" />

You can also use the imports/PackageTargetFallback workaround with portable-net45+win8+wp8+wpa81.

ericstj avatar May 26 '17 15:05 ericstj

This is just infuriating, MS left hand does not know what right hand is doing. Death by 1000 paper cuts.

Today I thought I would install Microsoft.CodeAnalysis.CSharp.Workspaces

Guess what:

Package Microsoft.Composition 1.0.27 is not compatible with netcoreapp1.1 (.NETCoreApp,Version=v1.1). Package Microsoft.Composition 1.0.27 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
One or more packages are incompatible with .NETCoreApp,Version=v1.1.

Even though the library I wanted to install is declared as netstandard1.3 it fails to install because of this dependency. This is just about 100th item within a month.

Where's the issue? I don't know and don't care. Who's the owner of Microsoft.Composition. Where is their bug tracker? How is your average dev supposed to know who owns what in Micorsoft?

Microsoft released a 1.1 product and we're all beta testers.

oliverjanik avatar May 30 '17 01:05 oliverjanik

@oliverjanik I understand how frustrating this is.

I have published an updated version of Microsoft.Composition (1.0.0.31) which pulls in the System.Composition (1.0.0.31) into your project. What this does is it allows for a path forward for packages that are using the Microsoft.Composition packages to move to System.Composition.

Could you try this?

  • Add this feed to the list of feeds considered: https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
  • Add a reference to the package Microsoft.Composition 1.0.0.31
  • Add a reference to Microsoft.CodeAnalysis.CSharp.Workspaces

This should ensure that the packages will correctly resolve.

AlexGhiondea avatar May 30 '17 21:05 AlexGhiondea

@AlexGhiondea That works! Thanks for acting so quickly.

Now you just need to push this to nuget.org and get Microsoft.CodeAnalysis.CSharp.Workspaces to depend on the new version ;-)

oliverjanik avatar May 31 '17 00:05 oliverjanik

@oliverjanik thanks for confirming that this solved your issue!

AlexGhiondea avatar May 31 '17 05:05 AlexGhiondea

+1 for the Microsoft.CodeAnalysis.CSharp.Workspace update

alexsorokoletov avatar Jun 01 '17 00:06 alexsorokoletov

Also looking forward to get fix on nuget

aka-STInG avatar Jun 20 '17 14:06 aka-STInG

The package has been pushed to Nuget.org.

AlexGhiondea avatar Jul 03 '17 21:07 AlexGhiondea

Added a workaround to https://github.com/aspnet/Tooling/issues/1051

RandyBuchholz avatar Jul 08 '17 14:07 RandyBuchholz

This is my csproj, where is it getting the idea that I need Microsoft.Composition?

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netcoreapp1.1</TargetFramework>

    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <EmbeddedResource Include="Blueprints\brian.json" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="1.1.3" />
    <PackageReference Include="xunit" Version="2.3.0" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Subscription.Services.EloquaImport\Subscription.Services.EloquaImport.csproj" />
  </ItemGroup>

</Project>

ghost avatar Oct 13 '17 20:10 ghost

It might be a transitive reference. Can you try the workaround called out above?

AlexGhiondea avatar Oct 13 '17 20:10 AlexGhiondea