Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DilipD · Apr 07, 2015 at 06:07 PM · unity 5pluginwindows store app

Referencing dlls in Unity Windows Store application

Hello,

I am trying to use WinRT Component in Windows Phone(8.1) Application built through unity. The Windows Runtime Component is "CustomVideoMFT.winmd". I have written a wrapper in .net(BridgeWrapper.dll) which acts as the bridge around Windows Runtime component & Unity.

There are two versions of this Bridge i.e one for the Windows Store Application & other one is a placeholder version for the Editor to successfully compile the scripts.

But, when I am trying to build the Project as a windows store Application, it fails with the following error:

Exception: Failed to run Reference Rewriter with cmdline --target="Temp/StagingArea\Plugins\WSA\BridgeWrapper.dll" --framework="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhoneApp\v8.1" --additionalreferences="Temp/StagingArea","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA\X86","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA\ARM","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA\PhoneSDK81","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA\PhoneSDK81\X86","Temp/StagingArea\TempSerializationWeaver\Plugins\WSA\PhoneSDK81\ARM" --platform="C:\Program Files (x86)\Windows Phone Kits\8.1\References\CommonConfiguration\Neutral\Windows.winmd" --support="Temp/StagingArea\UnityEngine.dll" --supportpartialns=Unity.Partial --system=System --dbg=pdb --alt=System.Xml.Serialization --ignore=System.IConvertible,mscorlib.[Temp/StagingArea\Plugins\WSA\BridgeWrapper.dll] Catastrophic failure while running rrw: System.NotSupportedException: Specified method is not supported. at Mono.Cecil.PE.ImageWriter.WritePEFileHeader() at Mono.Cecil.PE.ImageWriter.WriteImage() at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters) at Mono.Cecil.ModuleDefinition.Write(String fileName, WriterParameters parameters) at Unity.ReferenceRewriter.Program.Main(String[] args) PostProcessMetroPlayer.RunReferenceRewriter (WSASDK wsaSDK, System.String playerPackage, System.String stagingArea, System.String assemblyPath, System.String winRTLegacyPath) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:325) MetroPlugin.RunReferenceRewriter (System.String playerPackage, System.String stagingArea, System.String winrtLegacyPath) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/MetroPlugin.cs:148) PostProcessMetroPlayer.PostProcessSDKSpecific (WSASDK targetSDK, BuildTarget target, BuildOptions options, System.String playerPackage, System.String stagingArea, .ProjectImages images, .LibraryCollection libraryCollection) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:890) PostProcessMetroPlayer.PostProcess (BuildTarget target, BuildOptions options, System.String installPath, System.String stagingAreaData, System.String stagingArea, System.String playerPackage) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:597) UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:84) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316) UnityEditor.HostView:OnGUI()

I am not able to understand which method it is complaining about not being supported. Has anyone faced any similar issue here?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Ignas83 · May 13, 2015 at 07:40 PM

I assume you are running Unity 5. This exception is usually thrown by Mono Cecil when it's trying to save ARM assembly to disk. Have you marked your BridgeWrapper.dll as an ARM specific assembly in plugin inspector?

Also Unity can handle WinRT assemblies (winmd files) just fine. Maybe you don't need a wrapper?

If nothing above applies could you report a bug with a repro project? It's usually much easier for us to figure out what's wrong exactly.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Windows Store Platform Build Issues with Networking 0 Answers

Unity DJ your game Veemix! 1 Answer

Windows Universal IAP 0 Answers

Failed to re-package resources after adding unity in-app purchase service 1 Answer

Use Mathjax to display mathml in unity? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges