none
"rejecting request to register from file" when deploying

    Question

  • It looks like in the consumer preview, you can no longer deploy a metro app if your source lives on a network drive.  Does anyone know if this is the final behavior?  Makes it a bit of a pain to develop in a VM, when the "network" drive is actually local.

    I thought a big reason you'd map a drive (as I have) is to allow yourself to operate on files as if they're local.  If applications are piercing through that veil I think it's a red flag... 

    Tom

    Saturday, March 10, 2012 7:11 PM

Answers

  • Yes, it's by design that you cannot run a Metro app from a network drive and deployment from Visual Studio essentially registers the app with the system without actually packaging and installing it (so it doesn't get put into the normal install location, which is local).

    You can still work with sources on a network drive, but you'll have to override the deployment location, which by default is under the project's root directory (e.g. bin\).  You have several options:

    1) You can switch from local debugging to remote debugging and set the machine name as 'localhost'.  This will do a remote deployment on your local machine (thus not using the project's directory).  You don't need to install the Remote Debugger tools, nor start msvsmon for this to work on localhost.

    2) You can override the project's output directory.  Right-click on the project and change the output directory to something like: $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.

    3) If you still want normal output to live next to the sources, e.g. when you build the appx package, etc., you can override only the layout directory instead of the entire output path.  For this you'll need to modify your project file directly (e.g. *.jsproj, *.csproj, ...) to add the new value:

      <PropertyGroup>
        <LayoutDir>C:\WorkingFolder\$(MSBuildProjectName)\$(Configuration)</LayoutDir>
      </PropertyGroup>

    Hope that helps.

    ~Gearard

    Saturday, March 10, 2012 10:01 PM

All replies

  • Yes, it's by design that you cannot run a Metro app from a network drive and deployment from Visual Studio essentially registers the app with the system without actually packaging and installing it (so it doesn't get put into the normal install location, which is local).

    You can still work with sources on a network drive, but you'll have to override the deployment location, which by default is under the project's root directory (e.g. bin\).  You have several options:

    1) You can switch from local debugging to remote debugging and set the machine name as 'localhost'.  This will do a remote deployment on your local machine (thus not using the project's directory).  You don't need to install the Remote Debugger tools, nor start msvsmon for this to work on localhost.

    2) You can override the project's output directory.  Right-click on the project and change the output directory to something like: $(Temp)\$(MSBuildProjectName)\bin\$(Configuration), where Temp is an environment variable pointing to your Temp directory.

    3) If you still want normal output to live next to the sources, e.g. when you build the appx package, etc., you can override only the layout directory instead of the entire output path.  For this you'll need to modify your project file directly (e.g. *.jsproj, *.csproj, ...) to add the new value:

      <PropertyGroup>
        <LayoutDir>C:\WorkingFolder\$(MSBuildProjectName)\$(Configuration)</LayoutDir>
      </PropertyGroup>

    Hope that helps.

    ~Gearard

    Saturday, March 10, 2012 10:01 PM
  • Outstanding.  Thanks.  I am running my Windows 8 as a VM and have a mapped drive from the host that I am trying to save everything to.  This worked perfectly. 
    Wednesday, July 18, 2012 7:22 PM