# MSB4226 error

**URL:** <https://discuss.bitrise.io/t/msb4226-error/2112>\
**Category:** Builds\
**Tags:** xamarin\
**Created:** [June 28, 2017, 7:29am UTC](https://discuss.bitrise.io/t/msb4226-error/2112 "2017-06-28T07:29:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![freever](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@freever](https://discuss.bitrise.io/u/freever)\
**Post date:** [June 28, 2017, 7:29am UTC](https://discuss.bitrise.io/t/msb4226-error/2112/1 "2017-06-28T07:29:33Z")

</div>

I am getting a build error in the nuget restore step. The error applies to my UWP projects, for example:

```auto
/Users/vagrant/git/SalesApp/SalesApp.Windows/SalesApp.Windows.csproj(149,11): error MSB4226: The imported project "/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/xbuild/Microsoft/WindowsXaml/v15.0/Microsoft.Windows.UI.Xaml.CSharp.targets" was not found. Also, tried to find "Microsoft/WindowsXaml/v15.0/Microsoft.Windows.UI.Xaml.CSharp.targets" in the fallback search path(s) for $(MSBuildExtensionsPath) - "/Library/Frameworks/Mono.framework/External/xbuild/" . These search paths are defined in "/Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/MSBuild.dll.config". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.

```

I don’t really know where to start - any suggestions?

---

<div class="post-metadata">

**Author:** ![freever](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@freever](https://discuss.bitrise.io/u/freever)\
**Post date:** [June 28, 2017, 7:31am UTC](https://discuss.bitrise.io/t/msb4226-error/2112/2 "2017-06-28T07:31:10Z")

</div>

If this is any help, I have run a build using a workflow and github branch that worked perfectly yesterday, but fails today.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 29, 2017, 10:03am UTC](https://discuss.bitrise.io/t/msb4226-error/2112/3 "2017-06-29T10:03:09Z")

</div>

Hi @freever,

seems like either a Xamarin version issue (did you try to build the project with **the latest** Xamarin Studio on your Mac?), or a dependency issue (version or missing dep).

If that wouldn’t help, can you please send us the build’s [bitrise.io](http://bitrise.io) URL through email or the onsite chat?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 29, 2017, 8:01pm UTC](https://discuss.bitrise.io/t/msb4226-error/2112/4 "2017-06-29T20:01:30Z")

</div>

Solution reported by @freever in email:

> It seems to be related to the version of nuget. If we change the nuget [version in the nuget] restore step to use [nuget] 4.1.0 instead of “latest version” the problem disappears.
