Xaml live edit doesn't work with custom solution configuration - visual-studio-2017

In VisualStudio 2017, from any fresh solution, we have the two classic configurations: Debug and Release.
I added some others custom configuration and the Xaml Live Editor doesn't find any element to update in any page, but with the Debug configuration, it works well.
I can't find anything or any keyword to find my answer, so I am asking here.

This has been answered here: Developer Community
Evgeny [MSFT] ยท Nov 01 at 02:19 PM
Thank you for your feedback! You need to set XamlDebuggingInformation msbuild property to true in your configuration ( https://learn.microsoft.com/en-us/dotnet/api/microsoft.build.tasks.windows.markupcompilepass1.xamldebugginginformation ). By default it is
<XamlDebuggingInformation Condition="'$(XamlDebuggingInformation)' == '' and '$(ConfigurationName)' == 'Debug'">true</XamlDebuggingInformation>
It is not recommended for Release configuration as it increases the
size of your assembly by embedding file name, line and column info for
each element in XAML files.
Edit
The above solution is for WPF !
For UWP put this into the .csproj (Under Project tag) of your project
<PropertyGroup>
<!-- XAML DEBUG INFOs -->
<DisableXbfLineInfo Condition="'$(ConfigurationName)' != 'Release'">false</DisableXbfLineInfo>
</PropertyGroup>

Related

VS2019 + Xamarin.Forms = UWP/EXE dropped?

How do I get the UWP back into Xamarin.Forms Cross-Platform creation to have the templates ready to roll?
After picking through the release notes, playing with VS2019's UI and a few hours of web searching, I have only found others posting about the problem in the preview versions. Some say UWP is gone forever, some say it just isn't included by default (so Microsoft can brag about how the install went from 23GB to 8GB or something like that) - but no help on HOW TO re-enable it, or add it to the project creation wizard (apart from adding a blank UWP project sans all code that is in the iOS/Android projects).
<Project Sdk="Microsoft.NET.Sdk">
// the code is not the problem here,
// getting TO the code is the problem
</Project>
EXPECTED:
In VS2017, Xamarin.Forms Cross-Platform supplied iOS + Android + UWP templates by default.
ACTUAL:
Visual Studio 2019 seems to have removed the UWP template from Xamarin.Forms Cross-Platform project creation.
Update 9 apr.: a new version of 2019 was released which reinstates the UWP templates again
It is correct that the UWP template is removed from VS2019, I don't know the reason behind it, but we'll have to deal with it. There is however a page that runs you through the process step by step. It has been there for a while for the projects that were created in Visual Studio for Mac, which don't include the UWP template as well. The full description can be found here: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/platform/windows/installation/ taken from this page:
First, right-click on the solution and select Add > New Project... and add a Blank App (Universal Windows) project:
Then, select the minimum and targeted UWP versions.
Right-click on the UWP project and select Manage NuGet Packages... and add the Xamarin.Forms package. Ensure the other projects in the solution are also updated to the same version of the Xamarin.Forms package.
Also, make sure the new UWP project will be built in the Build > Configuration Manager window (this probably won't have happened by default). Tick the Build and Deploy boxes for the Universal project:
Right-click on the UWP project and select Add > Reference and create a reference to the Xamarin.Forms application project (.NET Standard or Shared Project).
In the UWP project, edit App.xaml.cs to include the Init method call inside the OnLaunched method around line 52:
// under this line
rootFrame.NavigationFailed += OnNavigationFailed;
// add this line
Xamarin.Forms.Forms.Init (e); // requires the `e` parameter
In the UWP project, edit MainPage.xaml by removing the Grid contained within the Page element. Then in MainPage.xaml, add a new xmlns entry for Xamarin.Forms.Platform.UWP, like this: xmlns:forms="using:Xamarin.Forms.Platform.UWP".
In MainPage.xaml, change the root <Page element to <forms:WindowsPage, like this:
<forms:WindowsPage
...
xmlns:forms="using:Xamarin.Forms.Platform.UWP"
...
</forms:WindowsPage>
In the UWP project, edit MainPage.xaml.cs to remove the: Page inheritance specifier for the class name (since it will now inherit from WindowsPage due to the change made in the previous step)
public sealed partial class MainPage // REMOVE ": Page"
In MainPage.xaml.cs, add the LoadApplication call in the MainPage constructor to start the Xamarin.Forms app:
// below this existing line
this.InitializeComponent();
// add this line
LoadApplication(new YOUR_NAMESPACE.App());
Add any local resources (eg. image files) from the existing platform projects that are required.
And now it should work as before. I know, it's a hassle to go through it for something that just worked before. Sorry about that, but this should get you there as well.
With the Update 16.0.1, Microsoft restored the UWP creation on new Xamarin.Forms applications
except when you try to use Shell, which is not available for UWP:
Issues fixed in Visual Studio 2019 version 16.0.1
Add option for Windows (UWP) platform when creating new Xamarin.Forms project from 'Mobile App (Xamarin.Forms)' project
template.
EDIT (7/17/2021): i have started a new xamarin forms solution and it seems all 3 platforms are available again in VS2019 on all prebuilt templates (blank, master-detail, tabbed layout).
thank you, everyone, for your input.
great information!
it helped me steel myself to face the fact:
UWP is gone (for now) from Xamarin.Forms new project scaffolding.
but, the (simplest) solution to the question asked that i have found is:
open VS2017. create new Xamarin.Forms cross-platform project.
once it is open, save-all.
then close VS2017 and open in VS2019 if so desired.

Harvest(Heat) Wix - archive resources in the msi

Is it possible to archive resources in msi file instead of creating .cab . What is the pros and cons of these two method
Embed Cabs: If you are referring to eliminating the external cab during MSI compilation for WiX visual studio projects, then you can achieve this by setting the EmbedCab attribute of the MediaTemplate element to "yes":
<MediaTemplate EmbedCab="yes" />
Here is an attempted "minimal changes" sample for how to build a basic MSI after creating a WiX project in Visual Studio. Suggest scrolling down to the actual WiX markup for the inline comments.
Why use External Cabs?: I rarely use external cabs if I can help it, but there are some advantages in some cases centering around build-speed and more reliable downloading (according to Arnson, see second link below). There may be further benefits. For example downloading a smaller cab for MSI repair operations if installation source is on a remote server - related to downloading. Cab files can make security software and anti-virus go spastic though.
How To: Optimize build speed
WiX and cabinetry
This question has been answered before BTW - in similar incarnations. See below.
Some Links:
Wix: single MSI instead of msi + cab
For the record: The embed cab behavior changed in WiX 3.8
What is the difference between Media and MediaTemplate in WIX?

Visual Studio 2015 crashes when starting debugger

When compiling my C++ project or running it, everything is fine.
But when starting my project with the debugger, Visual Studio 2015 crashes.
I tried this, I have found two errors:
<entry>
<record>484</record>
<time>2017/02/14 14:09:32.187</time>
<type>Error</type>
<source>Color Theme Service</source>
<description>The color &apos;Popup&apos; in category &apos;de7b1121-99a4-4708-aedf-15f40c9b332f&apos; does not exist.</description>
</entry>
and
<entry>
<record>558</record>
<time>2017/02/14 14:10:08.617</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Loading UI library</description>
<guid>{8C0C630B-37F1-11E3-8259-6C3BE516EAD0}</guid>
<hr>800a006f</hr>
</entry>
I don't know what to do to make VS's debugger work.
Edit: I use the dark theme if this can help...
One issue is that whether all projects have the same issue or just the specific one.
(1) Collect the crashed dump file and debugging it is also a good suggestion for the crashed issue.
(2) I also provide some suggestions which could narrow down this issue.
Please uncheck symbols server under Tools -> Options -> Debugging -> Symbols.
Uncheck "Edit and continue", "Load dll exports (native only)" and "enable just my code(managed only)". Debug it again.
Disable the IntelliTrace under TOOLS->Options->IntelliTrace, and "Use Native Compatibility Mode" under TOOLS->Option->Debugging->General or mix mode/native debugging project property(right click project->Debugging). Test it again.
I met the crashed issue before which was related to certain settings, so if possible, you could test it in your side.
But if all projects have the same issue, I suggest you repair your VS, or install the latest update package for your VS, and then debug it again.
If just one specific project has this issue, we would think about the project itself.
Update:
As our discussion, I found that you have reported this issue here:
https://connect.microsoft.com/VisualStudio/Feedback/Details/3123487
I will help you vote it and add my comment there. If I get any latest information from the report team, I will update it here.

Invalid License Exception when building TDS projects

We're running Sitecore 6.5 with a few TDS projects, and I've been trying to get TFS builds to work on our TFS Build server. We receive the following error when the projects attempt to build:
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0\HedgehogDevelopment.SitecoreProject.targets (354):
Exception Invalid License(Exception) in file sitecore\content.item.
Stack trace: at HedgehogDevelopment.SitecoreProject.Tasks.CollectSitecoreItems.Execute()
We've installed TDS on the build server, and I've verified in the registry that the license key matches to our license. Not quite sure what might be the next step. Has anybody encountered this issue with TDS continuous integration builds before?
I appreciate that this is an old question but wanted to add this in case anyone else stumbles upon it.
I've been setting up TDS on Visual Studio Online (what was TFS Online) following this wonderful article from Michael Edwards: http://www.experimentsincode.com/?p=586
Although it's a bit vague at the end of the article - you can actually include the License info with a config file. You have to add this file manually here:
C:\Program Files (x86)\MSBuild\HedgehogDevelopment\SitecoreProject\v9.0
Call the file TDSLicense.config
Save the following (with your license information in) in the file:
<?xml version="1.0" encoding="utf-8" ?>
<license Owner="CompanyName" Key="aaaa-bbb-ccc-dddd" />
If it's a permissions issue with reading the license from the registry - this should sort it out.
Micheal's blog post is well worth a read - it goes over and above what I've detailed here.
I'm not exactly sure I have an answer, but 2 things that happen to me frequently are:
The Hedgehog license expires once a month (not sure if that's my companie's agreement)
Sometimes I can't use TDS sync unless I re-install the SiteCore connector. Luckily, there's a button built-in for that: just right-click on TDS in Visual Studio, and select "Install SiteCore connector".
Hope this helps.

add Qt to existing Visual Studio c++ project [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I've got an existing Visual Studio C++ project. It creates a main window using GLUT and also uses glut for a right-click context menu.
All I want to do now, is to open a second window used as a property inspector to display and change some values.
Everyone recommends using Qt for GUI development, but all the tutorials I find discuss either working in Qt creator or how to create a Qt project from scratch.
I have used Qt some years ago to do something similar and it was not so difficult to add it to my project.
Can anyone explain, or point me to a tutorial explaining how to do this?
thanks!
Thank to Arno Duvenhage and Tom for their answers. Here are steps who worked for me in Qt 5.2.1 and Visual Studio 2012 and 2015:
Install QT Add In (for visual studio 2015 is in still in beta, but works fully for me).
Right click the project, select "Unload project".
Add add the <keyword>Qt4VSv1.0</keyword> entry into the <PropertyGroup Label="Globals"> tag.
Select load project.
Select "Convert project to Qt Add-in project" in "Qt 5" menu.
Almost done. Go to Qt project settings and Qt option in the Qt menu to set details.
In your project properties Linker\Additional Library Directories\ might need to add $(QTDIR)\lib
In your project properties C++\Additional Include Directories\ might need to add $(QTDIR)\include
In each of your classes derived from Q_OBJECT, delete the Q_OBJECT macro, save the file, return the Q_OBJECT macro (Ctrl+Z), and save again. It adds the 'moc' files to your generated files folder.
Set your project as startup project.
edit your project using an xml editor
i usually unload the project, right click on it and select edit
add the qt version you wish to use (for me it's):
Keyword="Qt4VSv1.0"
and the following globals
<Global
Name="lupdateOnBuild"
Value="0"
/>
<Global
Name="MocDir"
Value=".\GeneratedFiles\$(ConfigurationName)"
/>
<Global
Name="MocOptions"
Value=""
/>
<Global
Name="QtVersion Win32"
Value="QT 4.5.3"
/>
<Global
Name="RccDir"
Value=".\GeneratedFiles"
/>
<Global
Name="UicDir"
Value=".\GeneratedFiles"
/>
reload the project and fiddle with "convert project to QMake generated project" and it should work
This works for me:
manually change the project version to a qt project in the project file -- use <Keyword>Qt4VSv1.0</Keyword>'
reload the project
right click on the project and select 'update to a qt-addin project'
remove and add the qt source files to the project
Hope it helps.
There is an ability of qmake to generate .vcproj from a .pro file. So you should read qmake documentation to create a right .pro file.