dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.16k stars 4.71k forks source link

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) #21132

Closed sadeqhatami closed 4 years ago

sadeqhatami commented 7 years ago

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?

BattleRush commented 7 years ago

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

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

sadeqhatami commented 7 years ago

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

karelz commented 7 years ago

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

ericstj commented 7 years ago

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" />
pnobre commented 7 years ago

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.

seanterry42 commented 7 years ago

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.

ericstj commented 7 years ago

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.

seanterry42 commented 7 years ago

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

avikenjale commented 7 years ago

@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.

ericstj commented 7 years ago

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.

oliverjanik commented 7 years ago

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.

AlexGhiondea commented 7 years ago

@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?

This should ensure that the packages will correctly resolve.

oliverjanik commented 7 years ago

@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 ;-)

AlexGhiondea commented 7 years ago

@oliverjanik thanks for confirming that this solved your issue!

alexsorokoletov commented 7 years ago

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

aka-STInG commented 7 years ago

Also looking forward to get fix on nuget

AlexGhiondea commented 7 years ago

The package has been pushed to Nuget.org.

RandyBuchholz commented 7 years ago

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

ghost commented 7 years ago

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>
AlexGhiondea commented 7 years ago

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

ghost commented 7 years ago

Why doesn't the error message tell me what transitive references are causing the problem?

On Fri, Oct 13, 2017 at 1:56 PM, Alex Ghiondea notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dotnet/corefx/issues/18452#issuecomment-336565143, or mute the thread https://github.com/notifications/unsubscribe-auth/AX5XbueAZACC4y8px8tQkPfkxBKtIw0iks5sr855gaJpZM4M-mcx .

-- CONFIDENTIALITY NOTICE: The contents of this email message and any attachments are intended solely for the addressee(s) and may contain confidential and/or privileged information and may be legally protected from disclosure. It is then shared with tech companies, bots, hackers, government agencies, and marketers. The security of this message is none, and it may be shared on Instagram at anytime. If you are OK with this, please respond. There isn't really any security or privacy anywhere. If you disagree you may want to go camping and talk to people face-to-face like in old times.

cbruen1 commented 6 years ago

Adding a reference to Microsoft.Composition 1.0.0.31 solved it for me. I didn't need to add a reference to Microsoft.CodeAnalysis.CSharp.Workspaces - should I?