本文介绍了Sharepoint使用最新的PnP Js托管Addin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 嗨 我是pnp js的新手。我创建了SharePoint 2013托管插件,我想使用PnP js来执行SharePoint操作。这只是为了学习而我们用普通的jquery做不了什么。 一旦我编译我得到错误"找不到名称地图"。这是打字稿界面,但我不知道为什么我得到这个构建错误为什​​么visual studio无法编译 解决方案信息 我正在使用visual studio 2015.从项目中我创建了sharepoint 2013托管插件。之后我编辑了csproj文件并进行了以下输入以编译打字稿。  < PropertyGroup>   &NBSP; < TypeScriptSourceMap> true< / TypeScriptSourceMap>   < / PropertyGroup>   < Import Project =" $(MSBuildExtensionsPath32)\ Microsoft &\\VisualStudio \ v $(VisualStudioVersion)\ TypeScript \ MicroSoftScript.targets" /> $ 我安装了npm和typescript编译器。 我从导航到解决方案命令提示符并已安装  npm install @ pnp / logging @ pnp / common @ pnp / odata @ pnp / sp --save 我无法添加我的解决方案结构,因为我的帐户未经过验证,但是我在下载所有文件后所做的工作我在项目中包含节点模块,以便我可以将其用于参考 我将使用捆绑包捆绑所有pnp文件并在aspx页面中使用它 所以这不是问题。正如我之前所说,我无法编译。任何帮助都可以被欣赏。我甚至创建了tsconfig文件并填充了与pnp项目中存在的相同选项但是它不起作用。$ 打字稿版本为2.8.4 解决方案 HiI am new to pnp js. I have created SharePoint 2013 hosted addin and I wanted to use PnP js to perform SharePoint operations.This is just for learning and nothing which we cannot do using normal jquery.As soon as I compile I am getting error "Cannot find Name Map".This is typescript interface but I don't know why I am getting this build error Why visual studio is not able to compileSolution informationI am using visual studio 2015.From the project I created sharepoint 2013 hosted addin. After that I edited csproj file and made following entry for compiling typescript <PropertyGroup>    <TypeScriptSourceMap>true</TypeScriptSourceMap>  </PropertyGroup>  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />I have npm and typescript compiler installed.I navigated to the solution from the command prompt and installed npm install @pnp/logging @pnp/common @pnp/odata @pnp/sp --saveI am not able to add my solution structure because my account is not verified but what I did once all the files were downloaded I includes node module in the project so that I can use it for refrenceI will be using bundler to bundle all pnp files and use it in aspx page  so that is not an issue.As I told before I am not able to compile.Any help can be appreciated.I even created tsconfig file and populated with the same options as present in pnp projects but it didn't work.Typescript version is 2.8.4 解决方案 这篇关于Sharepoint使用最新的PnP Js托管Addin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 00:24