Giter Site home page Giter Site logo

azure / autorest.typescript Goto Github PK

View Code? Open in Web Editor NEW
174.0 154.0 72.0 58.6 MB

Extension for AutoRest (https://github.com/Azure/autorest) that generates TypeScript code. The transpiled javascript code is isomorphic. It can be run in browser and in node.js environment.

License: MIT License

JavaScript 1.44% TypeScript 98.53% Handlebars 0.03% PowerShell 0.01%
typescript isomorphic browser javascript nodejs autorest

autorest.typescript's Introduction

Azure TypeScript SDK and RLC Code Generator Libraries

This repository is the code generator libraries for Azure TypeScript SDK and Azure TypeScript Rest Level Client libraries.

Packages

Name Changelog Latest Next
@autorest/typescript Changelog
@azure-tools/typespec-ts Changelog
@azure-tools/rlc-common Changelog

@next version of the package are the latest versions available on the main branch.

General Introduction

Inside this project, we support both high level client generation and rest level client generation. In the rest level client generation, we support generate code from both rest api specs and typespec. In the high level client generation, we only support generation from rest api specs.

  • @autorest/typescript: contains the original high level client generation and the rest level client generation, mostly including the transformation from autorest code model into RLC model part.
  • @azure-tools/typespec-ts: is the typescript TypeSpec emitter, which contains the transformation from TypeSpec model into RLC model.
  • @azure-tools/rlc-common: contains the common generation logic from RLC model into rest client libraries code part. Which is depended by both @autorest/typescript rlc generation part and @azure-tools/typespec-ts.

autorest.typescript's People

Contributors

amarzavery avatar chradek avatar danieljurek avatar daviwil avatar dependabot[bot] avatar deyaaeldeen avatar dw511214992 avatar fearthecowboy avatar iscai-msft avatar jeremymeng avatar joheredi avatar jonathancrd avatar jsquire avatar kazrael2119 avatar konrad-jamrozik avatar kpajdzik avatar marygao avatar olydis avatar qiaozha avatar ramya-rao-a avatar rikkigibson avatar sarangan12 avatar sergey-shandar avatar thomasardal avatar timotheeguerin avatar timovv avatar v-jiaodi avatar witemple-msft avatar xirzec avatar zzhxiaofeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autorest.typescript's Issues

TS2339 - Property 'parsedbody' does not exist on HttpOperationResponse

autorest output of file https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json with following specifications:

typescript.azure-arm: true
typescript:
output-folder: ./lib/
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
package-name: microsoft-azure-devices-iothub-controlplane
input-file: ./src/2018-04-01/iothub.json
package-version: 2018.04.01.01
generate-metadata: true

fails on tsc. Receiving large number of TS2339. Noticed the issue is resolved when moving the dependency from ms-rest-js 0.2.1 to 0.3.0. Trying to understand if this is user error or if an issue is present.

Loading AutoRest core 'C:\Users\[email protected][email protected]\[email protected]\autorest-core\dist' (2.0.4277)
Loading AutoRest extension '@microsoft.azure/autorest.typescript' (~2.0.12->2.0.176)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.1.23->2.1.23)

New to tech -- so guidance appreciated.

Property 'code' does not exist on type 'never'

I'm getting this compile error in the generated typescript:

let internalError = null;
if (parsedErrorResponse.error) internalError = parsedErrorResponse.error;
error.code = internalError ? internalError.code : parsedErrorResponse.code;
error.message = internalError ? internalError.message : parsedErrorResponse.message;

Same goes for internalError.message. It's easily fixed, but have to do it manually now. Any reason for declaring a variable to be always null?

Simplify builds/configs

Estimate: 2 days

  • There's some ping-ponging between gulp and npm such that it's actually kinda tricky to figure out what happens when I run a given command (npm test, gulp test, build commands, etc). This can probably be helped quite a bit through usage of ts-node and mocha --require ts-node/register
  • The use of multiple project.json is sometimes confounding in terms of which scripts live where and which dependencies have been linked or not and so on.. Unless there's a really compelling reason to have them broken apart like this I'm inclined to have one project.json for everything in the repo, or at worst one project.json for the AutoRest extension package and one project.json for all code generator tests.

[NodeJs] The node sdk needs to make available discriminators more clear.

Currently, if there is a polymorphic discriminator that a user wants to provide in their request, they are required to look into the index.js in their models folder to see the available options.

In addition, children have their discriminators appended to that of their parent: <ParentDiscriminator>.#<ChildDiscriminator>, making it confusing what the right values should be.

Generated files seems to contain incorrect file names/paths

When generating a client using: autorest --typescript --output-folder=./ --input-file=./iothub.json --generate-metadata=true --typescript.azure-arm= true I end up having to make several changes before I can successfully run npm run-script build.

The first error I get is this:

npm run-script build

> @ build F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01
> npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js

error TS5058: The specified path does not exist: 'tsconfig.node.json'.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andbuc\AppData\Roaming\npm-cache\_logs\2017-12-04T18_54_27_484Z-debug.log

Looking at the generated output, neither 'tsconfig.node.json' nor 'tsconfig.browser.json' exist. Only 'tsconfig.json' exists. So after making this change to the 'tsc' script in the 'package.json' file I get this:

npm run-script build

> @ build F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01
> npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js

tsconfig.json(19,20): error TS5024: Compiler option 'declaration' requires a value of type boolean.
error TS18003: No inputs were found in config file 'F:/Projects/Ecosystem/azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/2017-07-01/tsconfig.json'. Specified 'include' paths were '["./lib/**/*.ts","./test/**/*.ts"]' and 'exclude' paths were '["node_modules"]'.
tsconfig.json(19,5): error TS5052: Option 'declarationDir' cannot be specified without specifying option 'declaration'.
tsconfig.json(20,5): error TS5052: Option 'declarationDir' cannot be specified without specifying option 'declaration'.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ build: `npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andbuc\AppData\Roaming\npm-cache\_logs\2017-12-04T18_54_55_385Z-debug.log

In order to fix the above, the following changes were necessary in the 'tsconfig.json' file:

  1. Change "declaration": "true" to "declaration": true
  2. Change the "include" array to have the correct directory of the generated TS files (it currently points to "./lib/**/*.ts", "./test/**/*.ts".

Next, I get the following:

npm run-script build

> @ build F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01
> npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js

Hash: 9f83505885a3f824ef10
Version: webpack 3.10.0
Time: 32ms

ERROR in Entry module not found: Error: Can't resolve './lib/iotHubClient.ts' in 'F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01'
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ build: `npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andbuc\AppData\Roaming\npm-cache\_logs\2017-12-04T18_56_48_028Z-debug.log

In order to fix ths above, the following changes were necessary in the 'webpack.config.js' file:

  1. Change entry: './lib/iotHubClient.ts' to entry: './output/iotHubClient.ts'

Next, I get the following:

npm run-script build

> @ build F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01
> npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js

ts-loader: Using [email protected] and F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01\tsconfig.json
Hash: 789ccfc2de768b8c2696
Version: webpack 3.10.0
Time: 3554ms
                                     Asset       Size  Chunks                    Chunk Names
                     iotHubClientBundle.js     365 kB       0  [emitted]  [big]  main
                 iotHubClientBundle.js.map     681 kB       0  [emitted]         main
             typings\lib\iotHubClient.d.ts    2.19 kB          [emitted]
             typings\lib\models\index.d.ts    39.3 kB          [emitted]
           typings\lib\models\mappers.d.ts      58 kB          [emitted]
  typings\lib\operations\certificates.d.ts    18.4 kB          [emitted]
         typings\lib\operations\index.d.ts  194 bytes          [emitted]
typings\lib\operations\iotHubResource.d.ts    77.5 kB          [emitted]
    typings\lib\operations\operations.d.ts    4.11 kB          [emitted]
   [0] ./output/models/mappers.ts 60.8 kB {0} [built]
   [3] ./output/iotHubClient.ts 3.68 kB {0} [built]
   [4] ./output/models/index.ts 232 bytes {0} [built]
   [5] ./output/operations/index.ts 538 bytes {0} [built]
   [6] ./output/operations/operations.ts 14.2 kB {0} [built]
   [7] ./output/operations/iotHubResource.ts 223 kB {0} [built]
   [8] ./output/operations/certificates.ts 59.5 kB {0} [built]
    + 2 hidden modules
ERROR: ENOENT: no such file or directory, open 'F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01\bundle.js'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at read_file (F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01\node_modules\uglify-es\bin\uglifyjs:320:19)
    at F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01\node_modules\uglify-es\bin\uglifyjs:167:37
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (F:\Projects\Ecosystem\azure-rest-api-specs\specification\iothub\resource-manager\Microsoft.Devices\2017-07-01\node_modules\uglify-es\bin\uglifyjs:166:31)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build: `npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\andbuc\AppData\Roaming\npm-cache\_logs\2017-12-04T18_58_48_219Z-debug.log

In order to fix ths above, the following changes were necessary in the 'package.json' file:

  1. Change "build": "npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o bundle.min.js bundle.js" to "build": "npm -s run-script tsc && webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o iotHubClientBundle.min.js iotHubClientBundle.js"

Only then am I able to get npm run-script build to complete successfully and produce a bundled typescript sdk for Azure ARM.

[Node.js] Incorrect comment format breaks JsDoc generation

As an example:

/**
* @class
* Initializes a new instance of the DatabaseAccountsListResult class.
* @constructor
* The List operation response, that contains the database accounts and their
* properties.
*
*/

The issue is caused by description followed by @constructor. This is not supported by JsDoc. The expected format is as follows:

/**
* Initializes a new instance of the DatabaseAccountsListResult class.
*/
class DatabaseAccountsListResult extends Array {
/**
  * The List operation response, that contains the database accounts and their
 * properties.
 */
  constructor() {
    super();
  }

The ask is applicable to all documented classes.

cc: @amarzavery

**Add support in the runtime to avoid OPTIONS call**

Estimate: ___ days
https://management.azure.com/api/invoke.

This allows browsers to avoid OPTIONS call for each CORS api call done in the browser. In this mode, the real call is added into the header “x-ms-path-query” something like below

"x-ms-path-query": "/subscriptions/a013b98a-6c2a-4f92-a6a7-82266ac6f437/resourceGroups/AScenTstRG/providers/Microsoft.Network/applicationGateways/AScenTstAppGwWAF?api-version=2017-10-01&$expand=frontendIPConfigurations/publicIPAddress,httpListeners/frontendPort"

This gives a big performance boost.

Reduce the size of the generated sdk and the underlying dependencies (ms-rest-js and ms-rest-azure-js)

Depends on #66.
Depends on Azure/ms-rest-js#97.

Estimate: ____(weeks)

  • Investigate if we can find out a way to not have wrapper methods for callback/promise and push all of this to a generic method in the runtime. This generic method gets the method signature of the method that was called, gets the parameters that were actually called on that method, it also gets other information that is required to make a successful request and what it should do upon receiving a response from the pipeline.
  • Another area of improvement is to move away from moment as a dependency. We use it only for validating, [de]serializing Durations. Currently ms-rest-js is around 109 KB in size of which 59KB is just moment. If we can rip out the pieces needed for Duration and create a separate library for that, then we are game. That should considerably bring the sdk size down.

Move validation to runtime functions

Depends on #157.
Depends on #156.
The final place for validating arguments should be inside ServiceClient.sendRequest(), but as a transition step I think we should add validation functions to msRest that generated code can call.

TS4022 Using RequestOptionsBase

autorest output of file https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/iothub/resource-manager/Microsoft.Devices/stable/2018-04-01/iothub.json with following specifications:

typescript.azure-arm: true
typescript:
output-folder: ./lib/
license-header: MICROSOFT_MIT_NO_VERSION
add-credentials: true
package-name: microsoft-azure-devices-iothub-controlplane
input-file: ./src/2018-04-01/iothub.json
package-version: 2018.04.01.01
generate-metadata: true

fails on tsc. "Receiving TS4022 -- has or is using private name 'RequestOptionsBase'." Manually corrected by exporting type RequestOptionsBase. Looking to understand if this is user error and / or correctable.

Loading AutoRest core 'C:\Users\[email protected][email protected]\[email protected]\autorest-core\dist' (2.0.4277)
Loading AutoRest extension '@microsoft.azure/autorest.typescript' (~2.0.12->2.0.176)
Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.1.23->2.1.23)

New to tech -- so guidance appreciated.

Mocking autorest generated typescript library

Are there plans to provide a way to easily mock the autorest generated typescript client? There was an issue two years ago in the main autorest C# repo but it doesn't look like they will implement it. It would be nice to be able to unit test larger projects without making real API calls.

Determine what types to use for stream request/response bodies on browser and Node

I noticed the generated return type for getFile() is a Response type which requires we compile with the lib: ["dom", ...] argument in tsconfig.json. I don't think this is quite right as I can see that the test case requires type asserting the response as any.

At a glance it looks like the "dom" lib adds all the DOM-only APIs to the global scope. We probably don't want that in an isomorphic lib, right? I'm not going to track that down yet as part of my "make CI pass" work, but we'll want to address it at some point because good server and browser interchangeable APIs for streaming I/O will be needed.

TS Generator tasks to be accomplished

  • Figure out running mocha tests in the browser
  • Figure out a way to document callbacks and promises accurately
  • Add support for enums and x-ms-enums
  • Improve paging experience by iterating over the items in the array present in the value property and automatically fetch the next page if present when iteration over the current list of items is complete
  • Improve the long running experience by providing a poller object that can provide the current status of polling and provides the final result once polling is done
  • Finalize the state diagram for long running operation and implement the state design pattern to make things easier for adding new states
  • Finalize the ms-rest-nodeauth repo
  • Create a separate repo and package named ms-rest-azure-env that provides the endpoints for different environments. This will help us to use this package for node and browser auth
  • Figure out a mechanism to auto-generate README.md with samples for typescript (and vanilla javascript (index.html) if possible)
  • BaseIsPolymorphic in the generator
  • Enum Validation for parameters on the client
  • Update ms-rest-js, ms-rest-azure-js, ms-rest-nodeauth with the recent changes made in ms-rest and ms-rest-azure (Azure/ms-rest-js#9)
    • changes related to polymorphic discriminator
    • add support for CognitiveServicesCredentials, APIKeyCredentials, KeyVaultClientCredentials, TopicCredentials (EventGrid data-plane)
  • Figure out a layout for all the sdks in the isomorphic javascript repo.

HttpOperationResponse.bodyAsJson not available

The generated code references msRest.HttpOperationResponse.bodyAsJson, which is not available in the latest version of ms-rest-js.

Instead, it appears that it should be referencing:

/**
 * The response body as parsed JSON or XML
 */
parsedBody?: {
        [key: string]: any;
    } | Array<any> | string | number | boolean | null | void;

Support different flavors of authentication calls and client instantiation signatures

The sample that we generate in README.md today, works for majority of the management plane clients. However, there are some packages where there is a mismatch between the constructor signature and the generated sample in README.md. Please take a look at this comment for more context.

There are two problems to solve. One is correct client instantiation signature and the other is use of the correct authentication method.

Some of the many possible ways to solve these problems:

Solving constructor signature

  • Defaults to what we do today.
  • Either reflect on the parameters of the client constructor, figure out the name of the parameters and use that for client construction. You will have to initialize the names of those parameters const subscriptionId = process.env.AZURE_SUBSCRIPTION_ID || "" v/s const tenantId = process.env. TENANT_ID || "" accordingly.
  • OR, create a setting constructor-signature: "new FooClient(creds, bar)" that can be set in the Readme.Typescript.md config file or passed as parameters via command line switch. --constructor-signature=""

Solving authentication call

  • Defaults to what we do today
  • Create a setting authentication-call: "const creds = await msRestNodeAuth.loginWithBar();" that can be set in the Readme.Typescript.md config file or passed as parameters via command line switch. --authentication-call="const creds = await msRestNodeAuth.loginWithBar();"

Add support to provide a pluggable request library

Estimate: ____ weeks

For making requests:

  • Today:

    • in the node.js environment we depend on node-fetch,
    • in the Browser we depend on fetch
    • if window.fetch is present in the browser
    • otherwise we use whatwg-fetch (github's fetch polyfill for browser's like IE11).
  • Future:
    we want to provide a plugin/hook where user's can provide their request library and we can plug that in to make requests.

This task will sort of go hand in hand with the request pipeline design.

Tweak the pipeline to suffice the needs of storage.

Estimate: ___ weeks

  • Current pipeline is also a linked list where every filter has a before() and after() method. The before() method is used to modify the request before it is sent on the wire and the after() method is used to modify the response before it is given to the generated sdk for deserialization.
  • The storage team does not like the idea of before() and after() methods. They would like the filter to have a single method that takes the request and response. If the method is supposed to act on the request/response it would do so.

**Add support to batch http requests**

Estimate: __ weeks

The browser has a notion of worker queue that allows around 7-10 requests to be made at any given time. This can severely limit the number of requests that can be made.
A workaround is to BATCH HTTP requests.
Today Azure only supports batching HTTP GET requests. ARM provides a POST API
https://management.azure.com/batch?api-version=2015-11-01 where the user can batch upto 20 GET requests as a payload(request body) and ARM sends a response containing all of them in one response body.

We need to implement a simple debouncer that waits for 100ms or 20 GET requests (whichever happens first) and fires off a batch of calls.
Example: private repo to get an idea.

Add support for xml [de]serialization.

Estimate: 4 weeks.

  • Figure out whether we need to use a library underneath. If so then which one? An option is to use xml2js is the popular choice an has minimal dependencies which do not have further transitive dependencies.
  • Figure out the design for structuring xml model definitions.
    • Currently we use mappers in the models for json. Do we want to use the same concept for xml?
    • Should there be separate mappers for xml and json model definitions or the mappings can both live coherently inside the mapper definition for a given model
  • What would happen when the service supports both aplication/json and application/xml ? What would be the effect on the generated sdk size (since we would have mappers for json and xml for a given model definition)?

'gulp build' step failing

I'm trying to build the project from source. I cloned the master branch and successfully ran 'npm install'. However, when I run 'gulp build' I'm met with several warnings and eventually a build failure that I'm having some trouble tracking down. Apparently the version for the codegen package is incorrect? Although I can clearly see it on NuGet.org and it seems to have installed on my machine.

F:\Projects\Ecosystem\autorest.typescript-fork>gulp build
[14:21:43] Using gulpfile F:\Projects\Ecosystem\autorest.typescript-fork\gulpfile.js
[14:21:44] Starting 'init'...
[14:21:44] Finished 'init' after 613 μs
[14:21:44] Starting 'clear-cache-on-force'...
[14:21:44] Finished 'clear-cache-on-force' after 14 μs
[14:21:44] Starting 'restore'...
[14:21:44] Starting 'version-number'...
[14:21:44] Finished 'version-number' after 238 ms
[14:21:44] Finished 'restore' after 323 ms
[14:21:44] Starting 'build/dotnet'...
           F:\Projects\Ecosystem\autorest.typescript-fork :: dotnet build -c Debug F:\Projects\Ecosystem\autorest.typescript-fork/autorest.typescript.sln /nologo /clp:NoSummary /p:VersionPrefix=2.0.68
Exec Failed F:\Projects\Ecosystem\autorest.typescript-fork :: dotnet build -c Debug F:\Projects\Ecosystem\autorest.typescript-fork/autorest.typescript.sln /nologo /clp:NoSummary /p:VersionPrefix=2.0.68
(stdout)
  File Not Found
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Collections.NonGeneric, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Collections.NonGeneric, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Collections.NonGeneric, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.ComponentModel, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.ComponentModel, Version=4.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.ComponentModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.ComponentModel.Primitives, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.ComponentModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.ComponentModel.TypeConverter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.ComponentModel.TypeConverter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.ComponentModel.TypeConverter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Dynamic.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Dynamic.Runtime, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Dynamic.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Globalization, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Globalization, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Globalization, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.IO, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.IO, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.IO, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Linq.Expressions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Linq.Expressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Linq.Expressions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.ObjectModel, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.ObjectModel, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.ObjectModel, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Reflection, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Reflection, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Reflection, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Reflection.Primitives, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Reflection.Primitives, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Reflection.Primitives, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Runtime.Serialization.Formatters, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.Serialization.Formatters, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime.Serialization.Formatters, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Runtime.Serialization.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Runtime.Serialization.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Runtime.Serialization.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Text.Encoding, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Text.Encoding, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Text.Encoding, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Threading.Tasks, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Threading.Tasks, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Threading.Thread, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Threading.Thread, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Xml.ReaderWriter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Xml.ReaderWriter, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
C:\Program Files\dotnet\sdk\1.0.4\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3243: No way to resolve conflict between "System.Xml.XmlDocument, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" and "System.Xml.XmlDocument, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Choosing "System.Xml.XmlDocument, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" arbitrarily. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]
  Consider app.config remapping of assembly "System.Threading.Thread, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Users\andbuc\.nuget\packages\system.threading.thread\4.3.0\ref\netstandard1.3\System.Threading.Thread.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Threading.Thread.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.ComponentModel.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.componentmodel.primitives\4.3.0\ref\netstandard1.0\System.ComponentModel.Primitives.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ComponentModel.Primitives.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Dynamic.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Users\andbuc\.nuget\packages\system.dynamic.runtime\4.3.0\ref\netstandard1.3\System.Dynamic.Runtime.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Dynamic.Runtime.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Runtime.Serialization.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.1.0" [C:\Users\andbuc\.nuget\packages\system.runtime.serialization.primitives\4.3.0\ref\netstandard1.3\System.Runtime.Serialization.Primitives.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Runtime.Serialization.Primitives.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Reflection.Primitives, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Users\andbuc\.nuget\packages\system.reflection.primitives\4.3.0\ref\netstandard1.0\System.Reflection.Primitives.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Reflection.Primitives.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Runtime.Serialization.Formatters, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.1.0" [C:\Users\andbuc\.nuget\packages\system.runtime.serialization.formatters\4.3.0\ref\netstandard1.3\System.Runtime.Serialization.Formatters.dll] to Version "4.0.2.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Runtime.Serialization.Formatters.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Xml.XmlDocument, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.1.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\system.xml.xmldocument\4.3.0\ref\netstandard1.3\System.Xml.XmlDocument.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Xml.XmlDocument.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Runtime, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.runtime\4.3.0\ref\netstandard1.5\System.Runtime.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Runtime.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Text.Encoding, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Users\andbuc\.nuget\packages\system.text.encoding\4.3.0\ref\netstandard1.3\System.Text.Encoding.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Text.Encoding.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.ComponentModel.TypeConverter, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.componentmodel.typeconverter\4.3.0\ref\netstandard1.5\System.ComponentModel.TypeConverter.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ComponentModel.TypeConverter.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Xml.ReaderWriter, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.xml.readerwriter\4.3.0\ref\netstandard1.3\System.Xml.ReaderWriter.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Xml.ReaderWriter.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Globalization, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Users\andbuc\.nuget\packages\system.globalization\4.3.0\ref\netstandard1.3\System.Globalization.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Globalization.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.IO, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.io\4.3.0\ref\netstandard1.5\System.IO.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.IO.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Threading.Tasks, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Users\andbuc\.nuget\packages\system.threading.tasks\4.3.0\ref\netstandard1.3\System.Threading.Tasks.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Threading.Tasks.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Reflection, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.reflection\4.3.0\ref\netstandard1.5\System.Reflection.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Reflection.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.ObjectModel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.10.0" [C:\Users\andbuc\.nuget\packages\system.objectmodel\4.3.0\ref\netstandard1.3\System.ObjectModel.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ObjectModel.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Collections.NonGeneric, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.1.0" [C:\Users\andbuc\.nuget\packages\system.collections.nongeneric\4.3.0\ref\netstandard1.3\System.Collections.NonGeneric.dll] to Version "4.1.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Collections.NonGeneric.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.Linq.Expressions, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.1.0.0" [C:\Users\andbuc\.nuget\packages\system.linq.expressions\4.3.0\ref\netstandard1.6\System.Linq.Expressions.dll] to Version "4.2.0.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.Linq.Expressions.dll] to solve conflict and get rid of warning.
  Consider app.config remapping of assembly "System.ComponentModel, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" from Version "4.0.0.0" [C:\Users\andbuc\.nuget\packages\system.componentmodel\4.3.0\ref\netstandard1.0\System.ComponentModel.dll] to Version "4.0.3.0" [C:\Users\andbuc\.net\2.0.0\node_modules\dotnet-sdk-2.0.0-win\sdk\NuGetFallbackFolder\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0\System.ComponentModel.dll] to solve conflict and get rid of warning.
  Version for package `dotnet-Perks.CodeGen` could not be resolved.
C:\Users\andbuc\.nuget\packages\dotnet-perks.codegen\2.0.1\build\netcoreapp2.0\dotnet-Perks.CodeGen.targets(9,5): error MSB3073: The command "dotnet Perks.CodeGen "azure\Templates\AzureMapperIndexTemplate.cshtml;azure\Templates\AzureMethodGroupTemplate.cshtml;azure\Templates\AzureMethodTemplate.cshtml;azure\Templates\AzureModelIndexTemplate.cshtml;azure\Templates\AzureReadmeTemplate.cshtml;azure\Templates\AzureServiceClientTemplate.cshtml;azure\Templates\PageModelTemplate.cshtml;vanilla\Templates\EnumTemplate.cshtml;vanilla\Templates\MapperIndexTemplate.cshtml;vanilla\Templates\MapperTemplate.cshtml;vanilla\Templates\MethodCallbackWrapperTemplate.cshtml;vanilla\Templates\MethodGroupIndexTemplate.cshtml;vanilla\Templates\MethodGroupTemplate.cshtml;vanilla\Templates\MethodJsonPipelineTemplate.cshtml;vanilla\Templates\MethodStreamPipelineTemplate.cshtml;vanilla\Templates\MethodTemplate.cshtml;vanilla\Templates\ModelIndexTemplate.cshtml;vanilla\Templates\ModelTemplate.cshtml;vanilla\Templates\NpmIgnore.cshtml;vanilla\Templates\PackageJson.cshtml;vanilla\Templates\ReadmeTemplate.cshtml;vanilla\Templates\ServiceClientTemplate.cshtml;vanilla\Templates\TsConfig.cshtml;vanilla\Templates\WebpackConfig.cshtml" obj/Razor AutoRest.TypeScript" exited with code 1. [F:\Projects\Ecosystem\autorest.typescript-fork\src\autorest.typescript.csproj]


Task Failed:  Execute Task failed, fast exit

Enum propertity disappears when set [Required]

I have a simple dto class like this:

    public class UserQueryRequest
    {
        [Required]
        public UserQueryType UserQueryType { get; set; }

        public string Username { get; set; }
    }
    public enum UserQueryType
    {
        ByUsername = 0
    }

the generation result in this:

/**
 * @interface
 * An interface representing UserQueryRequest.
 */
export interface UserQueryRequest {
  /**
   * @member {string} [username]
   */
  username?: string;
}

then I get rid of the [Required] attribute, and the result is correct

/**
 * @interface
 * An interface representing UserQueryRequest.
 */
export interface UserQueryRequest {
  /**
   * @member {string} [userQueryType] Possible values include: 'ByUsername'
   */
  userQueryType?: string;
  /**
   * @member {string} [username]
   */
  username?: string;
}

And I'm wondering if it is possible to build strong typed enums

infomations

1>AutoRest code generation utility [version: 2.0.4215]
1>(C) 2017 Microsoft Corporation.
1>https://aka.ms/autorest
1>No configuration found at 'file:///C:/Users/Lulus/Source/Repos/Dawu.Site/Dawu.Site.Admin/'.
1>   Loading AutoRest extension '@microsoft.azure/autorest.typescript' (~2.0.12)
1>   Loading AutoRest extension '@microsoft.azure/autorest.modeler' (~2.0.0)

[Required] attribute works well with string propertity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.