简体   繁体   English

Xamarin WPF 不反映没有重建的代码更改

[英]Xamarin WPF doesn't reflect code changes without rebuild

I've configured a Xamarin Forms WPF platform project using this guide: https://learn.microsoft.com/en-us/xamarin/xamarin.forms/platform/other/wpf我已经使用本指南配置了一个 Xamarin Forms WPF 平台项目: https://learn.microsoft.com/en-us/xamarin/xamarin.forms/platform/other/wpf

It's working, but when I make any change in my Xamarin.Forms class library project (either code or XAML), the change is not reflected in the actual WPF app.它正在工作,但是当我在我的 Xamarin.Forms class 库项目(代码或 XAML)中进行任何更改时,更改不会反映在实际的 WPF 应用程序中。 Only when I manually rebuild the Xamarin.Forms project, I see the changes reflected.只有当我手动重建 Xamarin.Forms 项目时,我才能看到反映的变化。

This is not happening in the UWP project, only in the WPF project.这不会发生在 UWP 项目中,只会发生在 WPF 项目中。

I managed to solve it by adding the following to the csproj file of the WPF project:我设法通过将以下内容添加到 WPF 项目的 csproj 文件来解决它:

<PropertyGroup>
    <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM