-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Problem sharing TS code files between different Visual Studio projects #7153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
what version of TS are you using? |
I'm using TypeScript 1.7.6 (in VS2015 CE). |
hi, I have the same problem. Both vscode and vs2015 can't handle shared files in multipy projects.
The "Find All Reference" doesn't find 'x' in both a.ts and b.ts |
@KoenT-IM consider specifing a require configuration (http://requirejs.org/docs/api.html#config) to map the location of your shared module. the other option, is to drop all your modules into a single output location, and use so your sources would look like:
with tsconfig.json as: {
"compilerOptions": {
"baseURL" : "./out",
"outDir": "./out"
}
} see https://github.com/Microsoft/TypeScript-Handbook/blob/release-2.0/pages/Module%20Resolution.md#base-url for more details. |
the original issue seems to be addressed. please reopen if this is not the case. |
Thanks mhegazy. Will verify and come back to this if needed soon (working towards a release now). |
I've been trying to make 2 Visual Studio 2015 CE web app projects share the same TypeScript file, but could not find a way to do this. I am using the AMD module system with require.
While coding VS seems to be fine with the require("......") statement for the common code file. However, when running, I get an exception from require.
I have more details on the general problem in this SO post:
http://stackoverflow.com/questions/35506086/using-typescript-files-in-different-web-apps-with-require-amd
and the repository with a self-contained example that reproduces the problem can be found here:
https://bitbucket.org/KoenT_IM/typescripttests
Just build and run the project under Applications/CodeSharingApp1 to reproduce this.
Perhaps the fact that the relative path "climbs out" of the project path to reference the common TS file, is what causes the problem. But then I'm not sure how to share a folder with common TS code files between different projects...
The text was updated successfully, but these errors were encountered: