web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Dependent Assembly - P...
Power Apps
Answered

Dependent Assembly - PluginPackage can not contain Microsoft.CrmSdk.CoreAssemblies

(0) ShareShare
ReportReport
Posted on by 48

I'm trying to test out the new "Dependent Assemblies" feature here and am running into an issue. I'm sure it's because I'm not doing something correctly.  I created a new plugin project using the `pac plugin init` command line per the directions. I've installed the "Power Platform Tools" extension in Visual Studio and connected to my organization.  However, when I try to create a new "Plug-in Package" in the "Power Platform Tools Explorer" for my organization, I get the following error: 

 

TITLE: Failed to import Plug-in Package
------------------------------

PluginPackage can not contain Microsoft.CrmSdk.CoreAssemblies. Assembly found Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 in the package (mscorlib)

------------------------------
BUTTONS:

OK
------------------------------

 

This message makes sense because I'm sure internally that Dynamics will use whatever version the platform is supposed to and so your package should not include these as dependencies, however, I don't see any way to exclude them.  Obviously I need this NuGet package installed in the project so that I can develop the plugins, but upon "Deploying" the package, I imagine there must be some process that is supposed to run to remove this from the generated .nupkg file so that when I go to upload it it no longer has it as a dependency or something. Anyway, any help here would be much appreciated.

I have the same question (0)
  • PeterPeter Profile Picture
    36 on at

    I'm having the same issue. Any ideas? 🙂

  • Verified answer
    eleung83 Profile Picture
    232 on at

    1. Are you building the nupkg file (Nuget package) via building the solution in Visual Studio? If so, have a look at the contents of the nupkg file. I'm guessing it contains the Microsoft.XRM.... dlls

    2. Check the csproj file that generates the nupkg. I spun up a new project using the pac cli commands and it should contain the following:

    eleung83_0-1659529540669.png

    If that "PrivateAssets" flag isn't there then it adds all the assemblies within that package to the publish folder which then includes all the assemblies into the nupkg

  • PeterPeter Profile Picture
    36 on at

    Adding PrivateAssets flag into CoreAssemblies reference solve the problem in my case. I'm just wondering why this flag is not there by default (I've created the project with Power Platform CLI)? I suppose it should be fix in the next version of CLI tools. 

    Anyway, big thanks for your help!

  • Steven Rasmussen Profile Picture
    48 on at

    That did it!  Thanks!

  • eleung83 Profile Picture
    232 on at

    Not sure, it could be due to the PAC CLI version you are running?

    It also seems like the pac command comes installed with 2 different csproj templates for plugin projects (stored in 2 different folders "plugin" and "pluginwithnuget".

     

    I fudged around with the 2 csproj templates to see which one was used when I generated a new plugin project, and it used the one in the "pluginwithnuget" folder which has the "PrivateAssets=All" set on every PackageReference.

     

    The other csproj template only has one packagereference set with the PrivateAssets flag

    eleung83_0-1659534203674.png

    But not sure how this other csproj could be used as the template for the pac command. Could just be a legacy thing with the pac cli commands

  • Steven Rasmussen Profile Picture
    48 on at

    In my case I had just installed the most recent version of the PAC CLI (v1.16.6) and the most recent version of the Power Platform Tools extension (v1.0.0.2).  Anyway, I imagine they'll get this fixed at some point but I'm glad there's a simple workaround. Thanks again!

  • Phil_Cole Profile Picture
    133 on at

    Just noticed the latest version of pac 1.17.4 contains generates an updated PluginBase.cs that includes PrivateAssets=All.

  • Danstec Profile Picture
    4 on at

    I have the same issue today while importing solution to QA environment, and the "PrivateAssets" flags are there.

  • wawojr Profile Picture
    3 on at

    Same here, this does not resolve my issue. 

  • Manresa Profile Picture
    6 on at

    Hi,

    I was having the same issue and I found out the configuration in the picture below as stated in Dependent Assembly plug-ins (preview) - Power Apps | Microsoft Learn. This should do the trick, but I actually solved it generating the project using the CLI instead of the Visual Studio extension.

    Manresa_1-1692807965596.png

    Using the CLI

    The CLI command is the one below as stated in Dependent Assembly plug-ins (preview) - Power Apps | Microsoft Learn. Apparently, this creates the Visual Studio project with the required configuration.

     

    pac plugin init -ss

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard