Bug 44854 - Install fails with "Error 1325. 'ImportAfter' is not a valid short file name"
Summary: Install fails with "Error 1325. 'ImportAfter' is not a valid short file name"
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Installer ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: High normal
Target Milestone: 15.4
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-09-29 02:10 UTC by Adam Hill
Modified: 2017-09-29 09:42 UTC (History)
14 users (show)

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


Attachments
Logs from msiexecfor the .680 installer (329.15 KB, application/zip)
2016-09-29 02:10 UTC, Adam Hill
Details
Installer error details (92.70 KB, text/plain)
2016-10-23 17:39 UTC, Adam Hill
Details


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:
Status:
RESOLVED FIXED

Description Adam Hill 2016-09-29 02:10:51 UTC
Created attachment 17793 [details]
Logs from msiexecfor the .680 installer

XVS 4.2.0.680 and 4.2.0.695 will not install via .msi or the Xamarin Studio updater. They both fail in the same way.

Dominic has suggested:

1) Creating an 'ImportAfter' directory on the C: drive
2) Making sure short file name creation is enabled manually via the "NtfsDisable8dot3NameCreation" value at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem being set to `0`. (It was set to (2) before I edited it)

Attached is a log from running msiexec with logging enabled for the .680 installer.

Environment:

Windows 10 Anniversary Edition v1607 (All updates)
Running in Parallels 12.0.2
Comment 1 Adam Hill 2016-10-05 17:39:54 UTC
Same behavior with XVS .695 and the new .730 as well.
Comment 2 Jose Gallardo 2016-10-12 14:07:29 UTC
Hi Adam,

Can you please confirm what Visual Studio version do you have installed on your machine?
If you're using Dev15, it's supported only by the built-in Xamarin feature.

Thanks!
Comment 3 Adam Hill 2016-10-12 15:50:22 UTC
Jose,

I am using Visual Studio Enterprise 2015 Update 3. Here is my About Visual Studio info:

----
Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Installed Version: Enterprise

Architecture and Modeling Tools   00322-80000-00000-AA713
Microsoft Architecture and Modeling Tools
    
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Microsoft Visual Studio Tools for Applications 2015   00322-80000-00000-AA713
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-80000-00000-AA713
Microsoft Visual Basic 2015

Visual C# 2015   00322-80000-00000-AA713
Microsoft Visual C# 2015

Visual C++ 2015   00322-80000-00000-AA713
Microsoft Visual C++ 2015

Visual F# 2015   00322-80000-00000-AA713
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-80000-00000-AA713
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.8.00927.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20907.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

AWS Toolkit for Visual Studio 2015   1.10.0.3
AWS Toolkit for Visual Studio 2015.
Copyright 2011-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.

This software includes third party software subject to the following copyrights:
- Logging from log4net, Apache License 
  [http://logging.apache.org/log4net/license.html]
- Putty for PPK to PEM conversion, MIT license 
  [http://www.chiark.greenend.org.uk/~sgtatham/putty/licence.html]
- NGit for AWS Elastic Beanstalk incremental push
  [https://github.com/mono/ngit/blob/master/NGit.license.txt]
- NSch dependency for NGit
  [https://github.com/mono/ngit/blob/master/NSch.license.txt]
- Sharpen dependency for NGit
  [https://github.com/mono/ngit/blob/master/Sharpen/AssemblyInfo.cs]
- ICSharpCode.SharpZipLib dependency for NGit
  [http://www.icsharpcode.net/opensource/sharpziplib/]
- Mono.Posix.dll and Mono.Security.dll dependencies for NGit
  [http://mono-project.com/FAQ:_Licensing#Licensing]
- MPFProj for Visual Studio Project Framework
  [http://mpfproj10.codeplex.com/license]
- JSON Checker for JSON validation
  [http://www.raboof.com/projects/jsonchecker/]

Azure App Service Tools v2.9.1   14.0.20622.0
Azure App Service Tools v2.9.1

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DataFactoryProject   1.0
Microsoft Data Factory Package

GorillaPlayerPackage Extension   1.0
GorillaPlayerPackage Visual Studio Extension Detailed Info

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2016.2.2    Build 106.0.20160913.91321
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

Microsoft .NET Core Tools (Preview 2)   14.1.20907.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Data Factory Node Node   1.0
Azure Data Factory extension for Visual Studio Server Explorer.

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.8
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.8.31111.1

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40701.9

Microsoft Team Foundation Server 2015 Power Tools   14.0
Power Tools that extend the Team Foundation Server integration with Visual Studio.

Microsoft Visual Studio Process Editor   1.0
Process Editor for Microsoft Visual Studio Team Foundation Server

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

OptionsPackage Extension   1.0
OptionsPackage Visual Studio Extension Detailed Info

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.40825.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40825.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40825.00
Profiling support for Python projects.

SQL Server Analysis Services   13.0.1700.68
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1700.68

SQL Server Data Tools   14.0.60812.0
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services   13.0.1700.68
Microsoft SQL Server Reporting Services Designers 
Version 13.0.1700.68

TechTalk SpecFlow   2015.1
TechTalk SpecFlow - Binding business requirements to .NET code, http://www.specflow.org
Copyright © 2009–2013 TechTalk

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual Studio Tools for Unity   2.3.0.0
Visual Studio Tools for Unity

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Xamarin   4.1.2.18 (fcbe082)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.1.2.21 (1cf254d)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.2.22 (f37444a)
Visual Studio extension to enable development for Xamarin.iOS.

XamlStylerVSPackage   1.0
XAML Styler.

----

Thanks.
Comment 4 Adam Hill 2016-10-23 17:39:20 UTC
Created attachment 18184 [details]
Installer error details

This is the error from the Xamarin.VS 4.2.1.15 Beta Cycle 8, SR 1.
Comment 6 dominique GRATPAIN 2016-11-11 23:07:30 UTC
I download the new stable version of Xamarin : 4.2.1.58 (Tools / Option / Xamarin / Others). 
When I install it, I have the following message : ‘ImportAfter’ is not a valid short file name (with no number error).
Then a new message windows appears : Xamarin Setup Wizard ended prematurely. 

It is very strange : the last stable version is 4.2.1.58 and the last beta is 4.2.1.57 (the beta is smaller then stable (57 / 58)). Why ??
Comment 7 Brendan Zagaeski (Xamarin Team, assistant) 2016-11-15 18:54:18 UTC
> (the beta is smaller then stable (57 / 58)). Why ??

Upon further consideration of build .58 it was decided that the additional commit in that build was not within scope for the Cycle 8 – Service Release 1, so the previous build was used for Stable.
Comment 8 dominique GRATPAIN 2016-11-15 20:48:57 UTC
Thanks, Brendan, but between number 57 or 58 is not a problem. 

My real problem is : ‘ImportAfter’ is not a valid short file name’. 
I am now completely blocked and I can no longer use Xamarin.

Read the attach file that I put on your thread in Xamarin Forum : https://forums.xamarin.com/discussion/82397/stable-channel-cycle-8-service-release-1/p1
Comment 9 Chris McBride 2017-01-06 23:35:58 UTC
Has there been any traction on this issue?
I can't upgrade to the latest Xamarin. I'm on 4.2.1.64 trying to go to 4.2.2.6  

I noticed these lines in my msi log:
PROPERTY CHANGE: Adding MSBUILD15IMPORTDIR property. Its value is 'G:\'.
PROPERTY CHANGE: Adding MSBuild15ImportAfter property. Its value is 'G:\ImportAfter\'.

Why its choosing G: doesn't make sense, but why is it trying to do anything with msbuild15? As I'm not installing to MSdev15. I tried to install xamarin for msdev15 and it didn't help.
I installed MsDev2017 hoping it might help, but it is still generating the g:\ImportAfter\

I tried the "workarounds" mentioned by Adam. Created ImportAfter in both C: and G: but that didn't help.
I changed the regkey to both 0 and 1, and that didn't help.

My Win7 machine is on a domain. There was a stackoveflow that mentioned there is an issue with domain machines. But my computer was already setup like the work around suggested.

Some people have reported that they tried to uninstall Xamarin and got the same error, now they are stuck.

This is a blocking issue, makes it impossible for some people to upgrade.
Comment 10 Brendan Zagaeski (Xamarin Team, assistant) 2017-01-07 00:25:42 UTC
## Note to the Xamarin team for cross-referencing

If the incorrect value of the MSBUILD15IMPORTDIR property is indeed the root cause of this issue, then this bug might become a non-issue once the planned fix Bug 38751 is in place for Cycle 9 Service Release 1.
Comment 11 Chris McBride 2017-01-07 00:35:28 UTC
Here are the lines from the log around the error:

MSI (s) (BC:F4) [14:57:31:978]: PROPERTY CHANGE: Modifying dir19BAE46863A13C9D207B2C62A621691B property. Its current value is 'C:\Program Files (x86)\MSBuild\Xamarin\iOS\de-DE'. Its new value: 'C:\Program Files (x86)\MSBuild\Xamarin\iOS\de-DE\'.
MSI (s) (BC:F4) [14:57:31:978]: PROPERTY CHANGE: Modifying dir7D1012CCBDF8F5C73385F39898A8E490 property. Its current value is 'C:\Program Files (x86)\MSBuild\Xamarin\iOS\cs-CZ'. Its new value: 'C:\Program Files (x86)\MSBuild\Xamarin\iOS\cs-CZ\'.
MSI (s) (BC:F4) [14:57:31:978]: PROPERTY CHANGE: Adding MSBUILD15IMPORTDIR property. Its value is 'G:\'.
MSI (s) (BC:F4) [14:57:31:988]: Note: 1: 1325 2: ImportAfter 
MSI (c) (60:80) [15:01:39:403]: Disallowing shutdown.  Shutdown counter: 0
Error 1325. 'ImportAfter' is not a valid short file name.
MSI (s) (BC:F4) [15:01:45:114]: Product: Xamarin -- Error 1325. 'ImportAfter' is not a valid short file name.

Does Bug 38751 have a fix? The comments seem to imply that an extra copy is being copied. When really the problem is MSBUILD15IMPORTDIR is essentially empty, when it should be ignored because the MSI setting is to not install 15.
Comment 12 Jason Rawlins 2017-01-13 01:13:19 UTC
Adam,

had the very same problem.. searched the registry for ImportAfter. I found that there was a few Entries mapped to D:\ImportAfter\.. funny thing is that D: is my DVD drive and I have no DVD in it ( I did, just happened to remove it sometime in December which is when this started for me).. So, I updated any reference to G:\ImportAfter (just happened to have a drive mapped to G:)

Just for fun, I created an ImportAfter folder in my G drive.. Not sure if it would have created it??

Why didn't I just put a disk in the drive? Couldn't as I'm logged into my machine remotely right now..

The upgrade worked and installed..

Not sure if it'll work for you but  it did for me..
Comment 13 Michel 2017-01-16 15:52:33 UTC
I had the same bug. No workaround worked.

With Jason remarks, i also found a d:\ImportAfter in the registry.

D: is my DVD drive. So I changed my dvd drive letter to something else. Then i connected  a clean usb flash drive to which i assigned the"D:" drive letter.

Upgraded installed without any problems.

There is no ImportAfter on the usb drive after the upgrade...
Comment 14 softlion 2017-01-26 08:57:05 UTC
I'm having this error when i try to upgrade from the previous beta (4.3.0.550) to the latest beta (Xamarin 4.3.0.609)

Error 1325. 'ImportAfter' is not a valid short file name.
=== Logging stopped: 26/01/2017  09:39:34 ===

I can not uninstall v4.3.0.550, same error.


I found some E:\importafter keys in registry (installer keys and also HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders)

The E: drive does not exist anymore (i removed the drive from the computer yesterday). I removed all these keys.

It worked !
TY !
Comment 15 Juan Marcelo Tondato 2017-06-28 16:29:18 UTC
Moving to 15.4 for proper investigation
Comment 16 Jose Gallardo 2017-07-12 18:28:49 UTC
This issue is fixed on 15.4.
Marking as resolved for internal verification.