Incremental build on iOS is not working - ios

Using VS2015 RTM together with remotebuild#1.0.1, I have the problem that the incremental build is not working. The problem is that the changed web resources are not updated in the remote-builds directory on the Mac.
I assume the problem is that the uploaded upload_xxxx.tgz contains an empty www folder. Currently, I know 2 workarounds:
stop and restart the remotebuild
rebuild in Visual Studio
Both alternatives I do not like. They are easy to forget, and they take a lot of time.
Is there a solution to the problem - or a better workaround?

Until the product team fixes the bug, you can patch a nodejs file as follows:
Open File Explorer and Navigate to %APPDATA%\npm\node_modules\vs-tac\lib\
Replace file remoteBuild.js with one from here
Note: if you are not using default npm installation location, then to find out the directory where remoteBuild.js is located, run “npm config get prefix” (from a command prompt) to get the base of the directory, “C:\Users\AppData\Roaming\npm” for me, and then replace “\node_modules\vs-tac\lib\remoteBuild.js”.

So I think the iosRemoteLaunch.js also needs to be updated, to reflect the new method name of httpOptions vs httpOptionsAsync. If you dont, you end up getting this little gem:
TypeError: undefined is not a function
at invokeUrl (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\lib\iosRemoteLaunch.js:31:24)
at Object.remote.debug (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\lib\iosRemoteLaunch.js:57:12)
at C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\emulator.js:37:27
at _fulfilled (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:749:13)
at C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:557:44
at flush (C:\Users\Nigel\AppData\Roaming\npm\node_modules\vs-tac\node_modules\q\q.js:108:17)
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)

Related

Why would Visual Studio be trying to copy files from outside the project to the bin and how do I fix it?

I've got a ASP.net MVC project using Telerik/Kendo controls running in Visual Studio 2015. I inherited a project form a coworker who passed it to me through Subversion/Tortoise SVN. When I compile the project on my computer, it give me permission errors about not copying to the bin. I tried changing the read only status and security on the bin folder, but I still get the message. I've never encountered this error before. Any suggestions on how to fix this? Where can I control where these files are being copied to? Maybe I can change it to put it in a file that it does have access to?
Unable to copy file "C:\Program Files (x86)\Progress\Telerik UI for
ASP.NET MVC R3
2017\spreadsheet\binaries\net40\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.xml"
to
"......\WFC\WFC\WFC\bin\Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.xml".
Access to the path '......\WFC\WFC\WFC\bin' is denied.
1. Clean Project.
2. Open Windows Task Manager and kill vbcsCompiler.exe process.
3. Build Whole Solution. and run.
Note:
Kill vbcscompiler.exe when u see access denied. I think it's bug in vs17.
You are using telerik dlls in your solution, That's why it's pulling in your solution.

How do I get F# Forge to work

I can't seem to get Forge to work.
I'm using VS Code 1.6.1 with Ionide-F# 2.8.2. Until now I've only compiled scripts, but I need a project file for a specfic .dll to work (Unmanaged Exports).
However I can't seem to get an F# project going with Forge. When I use the `>F# New Project" command it tells me I need to refresh my templates, because I don't have any.
If I refresh, nothing happens. I have git installed as was suggested in other places, but to no avail.
When I open Forge.exe directly from my C:\Users\>USER<\.vscode\bin-forge directory, it doesn't even go into interactive mode. I downloaded Forge separately with the same result.
Has anyone else encountered this issue?
I'm not sure why it's working now, the only thing I can remember doing is adding the following to my user settings:
"FSharp.toolsDirPath": "C:/Program Files (x86)/Microsoft SDKs/F#/4.0/Framework/v4.0",
"FSharp.fsiFilePath": "C:/Program Files (x86)/Microsoft SDKs/F#/4.0/Framework/v4.0/Fsi.exe"
Maybe Forge didn't find the F# tools, but they're on the windows path, so I can't fathom why it helped.

Error while running pub deploy: Cannot read link

I'm trying to run pub deploy command in my Dart project, but it always ends with this error: "Pub deploy failed, [1] Cannot read link". No more information outputs into console.
I tried to run it in basic Dart browser project (the one with text reversing), but same error occurred again.
Did anyone have same problem? Any ideas how to fix it?
I have the same issue.
In my case, the Dart project is stored in NTFS hard drive (I share it with Windows OS) and Dart deploy (run from Eclipse) runs on Ubuntu.
Simply move the Dart project to Ubuntu hard drive then things come back to normal.
GS
This is probably a problem with the packages symlinks. If you delete them and run pub install it should work again.
According to dart-sdk/lib/io/link.dart:
On the Windows platform, the link will be created as a Junction
On other platforms, the posix symlink() call is used to make a symbolic link
On Linux platforms, storing Dart project in NTFS drive causes Pub to fail. Because posix symlink() is used on NTFS partition and doesn't create a valid NTFS junction point.
The solution is to move the project folder to a partition that uses posix symlinks natively, such as one formatted to ext4.

trigger.io [Error 5] Access is denied

I just recently updated to the new version of forge, did not change anything on my setting and when I went to build my app I got an error that said it could not find the file..
so I made the copy of aapt file and put it in a directory where trigger said it was looking (the docs said trigger.io should have moved this file for me already but Im guessing it did not)
After I moved this file and ran the build again it looked like it found the file but now I get [Error 5] Access is denied.
I have checked the permissions on the folder as I am the admin and I have full permissions and I have launched trigger as an administrator and still nothing.
Thanks.
So again from what I can tell this is a problem with the python script that calls aapt.
When you look at the script it points only to aapt, this means its looking for a directory and not the aapt.exe file itself so the first thing that happens is
1) forge says it cant find the aapt directory, this is why you are getting the error message "cant find aapt tool"
2) by adding the directory you would get the access denied because then the script is trying to run all these commands on just the directory (this was the problem I ran into), by making the change below you do not need to create a directory, just leave everything how it is but add the exe and it should work
After doing some testing I found that by adding .exe to the pythong script in android_tasks.py the build was able to run successfully
if you look on line 35 of android_tasks.py and change 'appt' to 'appt.exe' it should build for you
this is what it looks like for me
path.join(sdk, 'build-tools', '*','aapt.exe')
Hope this helps

Why do I randomly get a "error to use section registered as allowDefinition='MachineToApplication'" when building an MVC project?

I have seen a few questions on SO about a similar error when deploying a website, but I seem to randomly get this error when building an ASP.NET MVC website in Visual Studio. Performing a clean usually fixes it, but is there any way to avoid this completely?
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. d:...\obj\debug\package\packagetmp\web.config
Note that it is complaining about the root web.config, not the one from the Views subdirectory.
I assume you're using the publish feature. I'm getting this error when using publish to a file directory.
Publishing your app creates a temporary copy of your application in the \obj\debug\package\packagetmp\web.config directory.
That web.config confuses the IDE which thinks it is an application, but its not in a virtual directory so you get the error.
Workaround:
It's a simple workaround to add this to a pre-build command:
del "$(ProjectDir)\obj\Debug\Package\PackageTmp\web.config"
Failed workarounds:
Changing the directory for 'Location where package will be created' under 'Package/Publish Web' settings doesn't seem to have an effect - even if you get clever and try to put it outside the project root with ......
Creating an actual virtual directory in IIS for 'PackageTmp' didn't fix it either!
CONNECT ISSUE:
http://connect.microsoft.com/VisualStudio/feedback/details/503254/web-config-in-package-folder-makes-it-impossible-to-compile-debug
I hope they fix this in the RC!
I was unable to get the other workaround to work, but the following pre-build event seemed to work for me:
rmdir /s /q "$(ProjectDir)obj\Debug\Package"
rmdir /s /q "$(ProjectDir)obj\Debug\TransformWebConfig"
rmdir /s /q "$(ProjectDir)obj\Release\Package"
rmdir /s /q "$(ProjectDir)obj\Release\TransformWebConfig"
I answered a similar question recently, and this looks like it might be related.
To summarize, I ran into this in one of our MVC projects, and it was due to having the MvcBuildViews property in the project file set to true. Setting the property to false fixed the problem.
<MvcBuildViews>false</MvcBuildViews>
I also found this answer which outlines an alternative that does not require turning off view building.
You can safely put this target build at the end of your .csproj file and leave MvcBuildViews to true.
It deletes the obj folder before starting the build...
<Target Name="BeforeBuild">
<!-- Remove obj folder -->
<RemoveDir Directories="$(BaseIntermediateOutputPath)" />
</Target>

Resources