question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't build on windows "error Type 'Microsoft.Graphics.Canvas.Brushes.ICanvasBrush' could not be found"

See original GitHub issue

NB Never post screenshots of code. Post copy paste-able code if you include any. Ignoring this will likely lead to direct closing of the issue. Please respect the time and energy of open source maintainers.

Bug

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest release of the library, as maybe said bug has been already fixed.

Unexpected behavior

If you have unexpected behavior, please create a clean project with the latest versions of react-native and react-native-svg

react-native init CleanProject
cd CleanProject/
yarn add react-native-svg
cd ios && pod install && cd ..
modify App.js -> run the app

If it’s still an issue with the latest versions, please make an sscce in the clean project, and make it available as a git repo on github. Or as a https://snack.expo.io/ if expo has the latest version, and / or the bug exists both in the latest version and the one used in expo and snack.

Environment info

Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project

React native info output:

 // paste it here

Library version: x.x.x

Steps To Reproduce

I got the error on windows, when run the application cppwinrt : error Type ‘Microsoft.Graphics.Canvas.Brushes.ICanvasBrush’ could not be found

"D:\ItArtists\ProAir\ProMobile\windows\packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native....\bin"cppwinrt @“Debug\proair.vcxproj.cppwinrt_ref.rsp” cppwinrt : error Type ‘Microsoft.Graphics.Canvas.Brushes.ICanvasBrush’ could not be found method: Brush type: RNSVG.IBrushView database: D:\ItArtists\ProAir\ProMobile\windows\Debug\RNSVG\RNSVG.winmd 10>D:\abc\Pro\appli\windows\packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native\Microsoft.Windows.CppWinRT.targets(752,9): error MSB3073: The command "“D:\ItArtists\ProAir\ProMobile\windows\packages\Microsoft. Windows.CppWinRT.2.0.210312.4\build\native....\bin"cppwinrt @“Debug\proair.vcxproj.cppwinrt_ref.rsp”” exited with code 1. [D:\abc\Pro\appli\windows\proair\proair.vcxproj]

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
taduydecommented, Jul 28, 2022

Hi @creambyemute, I resolved this issue by install nuget package: https://www.nuget.org/packages/Microsoft.Graphics.Win2D/

0reactions
17Amir17commented, Sep 24, 2022

I get the following error

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2664	'auto winrt::impl::consume_Windows_Foundation_Collections_IVector<winrt::Windows::Foundation::Collections::IVector<winrt::Windows::UI::Xaml::UIElement>,T>::Append(const winrt::Windows::UI::Xaml::UIElement &) const': cannot convert argument 1 from 'winrt::Microsoft::Graphics::Canvas::UI::Xaml::CanvasControl' to 'const winrt::Windows::UI::Xaml::UIElement &'	RNSVG	C:\Users\dev\app\node_modules\react-native-svg\windows\RNSVG\SvgView.cpp	27	

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error NETSDK1130: Microsoft.Graphics.Canvas.winmd cannot ...
After the update I was not able anymore to build a .Net Maui and got the same error 3 times: Error NETSDK1130: Microsoft.Graphics.Canvas.winmd...
Read more >
Xamarin.UWP: Release build failed when solution has many ...
I have two solutions base on the same framework, has the same NuGet packages, and all can run in debug model and be...
Read more >
Is Win2D yet available in C++/WinRT? - Stack Overflow
Using the above command prompt produces an error 0x80070057: Could not resolve metadata specification: lib\uwp10.0\Microsoft.Graphics.Canvas.
Read more >
CanvasDrawingSession.FillRectangle Method (Single, Single ...
Fills the interior of a rectangle, using a brush to define the color and a second brush to specify an opacity mask. Namespace:...
Read more >
react-native-art-svg - Bountysource
How can I work with matrices in react-native-svg in order to accumulate the ... Can't build on windows "error Type 'Microsoft.Graphics.Canvas.Brushes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found