tasks/remove-modules.js
function (csprojFilePath, success, error) {
            var parser = new xml2js.Parser(),
                projectGuid;

            fs.readFile(csprojFilePath, function(err, data) {
                if (typeof(data) !== 'undefined') {
                    parser.parseString(data, function (err, result) {
                        if (typeof(result) !== 'undefined') {
                            projectGuid = JSON.stringify(result.Project.PropertyGroup[0].ProjectGuid[0].toString());
                            projectGuid = projectGuid.replace(/"/g, '');
                            success(projectGuid);
                        } else {
                            error(err);
                        }
                    });
                } else {
                    error(err);
                }
            });
        }
function (csprojFilePath, success, error) {
            var parser = new xml2js.Parser(),
                projectGuid;

            fs.readFile(csprojFilePath, function(err, data) {
                if (typeof(data) !== 'undefined') {
                    parser.parseString(data, function (err, result) {
                        if (typeof(result) !== 'undefined') {
                            projectGuid = JSON.stringify(result.Project.PropertyGroup[0].ProjectGuid[0].toString());
                            projectGuid = projectGuid.replace(/"/g, '');
                            success(projectGuid);
                        } else {
                            error(err);
                        }
                    });
                } else {
                    error(err);
                }
            });
        }
function ( csprojFilePath , success , error ) { var parser = new xml2js . Parser ( ) , projectGuid ; fs . readFile ( csprojFilePath , function ( err , data ) { if ( typeof ( data ) !== 'undefined' ) { parser . parseString ( data , function ( err , result ) { if ( typeof ( result ) !== 'undefined' ) { projectGuid = JSON . stringify ( result . Project . PropertyGroup [ 0 ] . ProjectGuid [ 0 ] . toString ( ) ) ; projectGuid = projectGuid . replace ( / " / g , '' ) ; success ( projectGuid ) ; } else { error ( err ) ; } } ) ; } else { error ( err ) ; } } ) ; }
Extracts the project GUID from the provided .csproj file.
Extracts the project GUID from the provided . csproj file .