Bug 42172 - Replacing the $safeprojectname$ with the projectname not working in Visual studio 2015 Community edition
Summary: Replacing the $safeprojectname$ with the projectname not working in Visual st...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: 4.1.2 (C7SR1)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-25 15:36 UTC by Sameer Ahmed
Modified: 2016-12-27 21:56 UTC (History)
7 users (show)

Tags: Android ac
Is this bug a regression?: ---
Last known good build:

Alert Box with $safeprojectname$ as name of app (6.54 KB, image/png)
2016-06-25 15:36 UTC, Sameer Ahmed

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Sameer Ahmed 2016-06-25 15:36:19 UTC
Created attachment 16490 [details]
Alert Box with $safeprojectname$ as name of app

Hi Xamarin Team,

Can someone help me with this SO question . Did not get any response at SO. Hope you Geeks will resolve this quickly.
Replacing the $safeprojectname$ with the projectname not working,When we uninstall this Xamarin.Form app from android device we are getting attached alert box with $safeprojectname$ as a name of app instead of actual name of the app.

Looks like while compiling the value of $safeprojectname$ is not getting replaced with the application name.

Therefore, let us know how to fix this bug.

Sameer Ahmed.S
Comment 1 E.Z. Hart [MSFT] 2016-07-11 21:46:46 UTC
$safeprojectname$ is a variable used by the Visual Studio templating system; it should be replaced with the name of your project at project creation time.

Is this happening on new projects you create? Are you using Visual Studio or Xamarin Studio? Can you upload a project which reproduces this error?

The XF Team
Comment 2 MikeN 2016-07-24 02:28:37 UTC
I encountered this problem after I created a Portable model project from scratch from Visual Studio.
Comment 3 xamarinbugzilla 2016-08-23 17:31:50 UTC
I get this too using visual studio with xamarin and xamarain android - just made a blank new pcl forms app with the wizard with ios and android projects. Build, run, then uninstall from a device using marshmallow. I get $safeprojectname every time.
Comment 4 E.Z. Hart [MSFT] 2016-08-25 20:44:06 UTC
I can confirm this happens in Visual Studio 2015 with Update 3. It looks like the $safeprojectname$ variable is not getting its value substituted in the AndroidManifest.xml template (though it seems to be working everywhere else in the generated project). 

As a temporary workaround, you can manually edit the AndroidManifest.xml file in your Android project (it's under the Properties folder) or through the GUI by going to the projects 'Properties' page and using the 'Android Manifest' tab.
Comment 5 Jose Gallardo 2016-12-27 21:56:31 UTC

We've added several improvements to the cross-platform templates, that should be already addressing this issue.

I'm marking the bug tentatively as resolved, but if you can still reproduce the issue with XVS 4.3.x  (currently in the Alpha channel) please feel free to reopen.